mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 05:18:11 +00:00
changes
This commit is contained in:
@@ -21,6 +21,10 @@ export class TrainSchedulesRepository extends BaseRepository<TrainSchedule> {
|
||||
findByIdWithFullGraph(id: string, manager?: EntityManager): Promise<TrainSchedule | null> {
|
||||
return this.repo(manager).findOne({
|
||||
where: { id },
|
||||
// One SELECT per relation instead of a single monster join — the nested
|
||||
// wagon×allocation×booking×container branches multiply rows catastrophically
|
||||
// when joined (measured ~925ms vs ~84ms on a 21-wagon schedule).
|
||||
relationLoadStrategy: 'query',
|
||||
relations: {
|
||||
// Yards carry the route's display name; without them formatRouteLabel
|
||||
// degrades to the literal "Origin → Destination". Milestones (with
|
||||
|
||||
Reference in New Issue
Block a user