forked from noxious/server
OOP is my passion ( ͡° ͜ʖ ͡°)
This commit is contained in:
@ -10,7 +10,7 @@ class Database {
|
||||
|
||||
public static async initialize(): Promise<void> {
|
||||
try {
|
||||
Database.orm = await MikroORM.init(config)
|
||||
this.orm = await MikroORM.init(config)
|
||||
this.logger.info('Database connection initialized')
|
||||
} catch (error) {
|
||||
this.logger.error(`MikroORM connection failed: ${error}`)
|
||||
@ -18,8 +18,8 @@ class Database {
|
||||
}
|
||||
}
|
||||
|
||||
public static getEntityManager(): EntityManager {
|
||||
return Database.orm.em.fork()
|
||||
public static getORM(): MikroORM {
|
||||
return this.orm
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user