bumpi
This commit is contained in:
parent
bbc56a9af7
commit
1f9562d36b
13 changed files with 525 additions and 507 deletions
|
@ -19,12 +19,6 @@ final class FoodOrderRepository extends ServiceEntityRepository
|
|||
parent::__construct($registry, FoodOrder::class);
|
||||
}
|
||||
|
||||
public function save(): void
|
||||
{
|
||||
$this->getEntityManager()
|
||||
->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FoodOrder[]
|
||||
*/
|
||||
|
@ -48,6 +42,15 @@ final class FoodOrderRepository extends ServiceEntityRepository
|
|||
->getValues();
|
||||
}
|
||||
|
||||
public function findLatestOrder(): FoodOrder|null
|
||||
{
|
||||
return $this->createQueryBuilder('alias')
|
||||
->orderBy('alias.id', 'DESC')
|
||||
->setMaxResults(1)
|
||||
->getQuery()
|
||||
->getOneOrNullResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FoodOrder[]
|
||||
*/
|
||||
|
@ -63,12 +66,9 @@ final class FoodOrderRepository extends ServiceEntityRepository
|
|||
->getResult();
|
||||
}
|
||||
|
||||
public function findLatestOrder(): FoodOrder|null
|
||||
public function save(): void
|
||||
{
|
||||
return $this->createQueryBuilder('alias')
|
||||
->orderBy('alias.id', 'DESC')
|
||||
->setMaxResults(1)
|
||||
->getQuery()
|
||||
->getOneOrNullResult();
|
||||
$this->getEntityManager()
|
||||
->flush();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue