• Use an existing MikroORM instance.

    Type Parameters

    • T extends MikroORM<IDatabaseDriver<Connection>, EntityManager<IDatabaseDriver<Connection>>> = MikroORM<IDatabaseDriver<Connection>, EntityManager<IDatabaseDriver<Connection>>>

      Type of the MikroORM instance. Typically, the MikroORM export of your MikroORM driver.

    Parameters

    • name: string = 'default'

      The name of the instance.

    Returns T

    The MikroORM instance for the given name.

    Throws

    NuxtMikroOrmNotInitialized When trying to use an instance that wasn't previously initialized with initOrm or registerGlobalOrm.