1
0
Fork 0

Set default order in `Leaderboard->entries` Doctrine collection

This commit is contained in:
Krzysztof Sikorski 2022-05-13 22:40:48 +02:00
parent e74098c1a2
commit 59d2500271
Signed by: krzysztof-sikorski
GPG Key ID: 4EB564BD08FE8476
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@ class Leaderboard implements UuidPrimaryKeyInterface, GamePeriodReferenceInterfa
]
private ?GamePeriodInterface $gamePeriod = null;
#[ORM\OneToMany(mappedBy: 'leaderboard', targetEntity: LeaderboardEntry::class)]
#[
ORM\OneToMany(mappedBy: 'leaderboard', targetEntity: LeaderboardEntry::class),
ORM\OrderBy(value: ['position' => 'ASC']),
]
private Collection $entries;
public function __construct()