Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Źle sortuje
- $qb = $this->createQueryBuilder('t');
- $qb->select('t, team, league')
- ->leftJoin('t.team', 'team')
- ->leftJoin('t.league', 'league')
- ->orderBy('t.points', 'DESC')
- ->orderBy('t.shootGoal', 'DESC')
- ->orderBy('t.loseGoal', 'ASC')
- ;
- // Dobrze sortuje
- $table = $teamInLeagueRepository->findBy(
- [],
- [
- 'points' => 'DESC',
- 'shootGoal' => 'DESC',
- 'loseGoal' => 'ASC'
- ]
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement