Attempt to fix performance :(((

This commit is contained in:
2025-01-05 07:22:23 +01:00
parent d7982493e1
commit cc1dbe5179
7 changed files with 31 additions and 35 deletions

View File

@ -2,11 +2,8 @@ import { randomUUID } from 'node:crypto'
import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
import { Character } from './character'
import { Chat } from './chat'
import { MapEffect } from './mapEffect'
import { MapEventTile } from './mapEventTile'
import { MapEventTileTeleport } from './mapEventTileTeleport'
import { BaseEntity } from '#application/base/baseEntity'
import { UUID } from '#application/types'
@ -44,10 +41,7 @@ export class Map extends BaseEntity {
@OneToMany(() => MapEventTile, (tile) => tile.map, { orphanRemoval: true })
mapEventTiles = new Collection<MapEventTile>(this)
@OneToMany(() => PlacedMapObject, (pmo) => pmo.map, {
name: 'placedMapObjects',
orphanRemoval: true
})
@OneToMany(() => PlacedMapObject, (placedMapObject) => placedMapObject.map, { orphanRemoval: true })
placedMapObjects = new Collection<PlacedMapObject>(this)
setId(id: UUID) {