mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-08 01:14:34 +02:00
Add small time differences to the datafixtures log entries, to get a defined order
This commit is contained in:
parent
a54ce939ca
commit
88ef1788ac
2 changed files with 8 additions and 1 deletions
|
@ -225,7 +225,10 @@ class LogEntryRepository extends DBElementRepository
|
|||
->leftJoin('log.user', 'user')
|
||||
->andWhere('log.target_type = :target_type')
|
||||
->andWhere('log.target_id = :target_id')
|
||||
->orderBy('log.timestamp', 'DESC');
|
||||
->orderBy('log.timestamp', 'DESC')
|
||||
//Use id as fallback, if timestamp is the same (higher id means newer entry)
|
||||
->addOrderBy('log.id', 'DESC')
|
||||
;
|
||||
|
||||
$qb->setParameter('target_type', LogTargetType::fromElementClass($element));
|
||||
$qb->setParameter('target_id', $element->getID());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue