Commit 3deb8865 authored by nanahira's avatar nanahira

Update src/tournament/tournament.service.ts

parent 95ee7e93
Pipeline #38204 passed with stages
in 5 minutes and 27 seconds
...@@ -38,13 +38,16 @@ export class TournamentService extends CrudService(Tournament, { ...@@ -38,13 +38,16 @@ export class TournamentService extends CrudService(Tournament, {
'matches.player2', 'matches.player2',
'matches.winner', 'matches.winner',
], ],
extraGetQuery: (qb) => extraGetQuery: (qb) => {
qb qb
.addOrderBy('participants.seq', 'ASC') .addOrderBy('participants.seq', 'ASC')
.addOrderBy('participants.id', 'ASC') .addOrderBy('participants.id', 'ASC')
.addOrderBy('matches.round', 'ASC') .addOrderBy('matches.round', 'ASC')
.addOrderBy('matches.isThirdPlaceMatch', 'ASC') .addOrderBy('matches.isThirdPlaceMatch', 'ASC')
.addOrderBy('matches.id', 'ASC'), .addOrderBy('matches.id', 'ASC');
qb.expressionMap.relationLoadStrategy = 'query';
return qb;
},
}) { }) {
constructor( constructor(
@InjectRepository(Tournament) repo, @InjectRepository(Tournament) repo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment