Feat: Make some entities soft-deletable
This commit is contained in:
1 parent
168a69c103
commit
d7bbb4bb29
27 files changed
+213
-63
No files matched your search
@@ -29,12 +29,16 @@ class DestinationRepository extends ServiceEntityRepository
|
||||
$qb = $this->createQueryBuilder('destination');
|
||||
|
||||
$dates = $qb
|
||||
->where($qb->expr()->orX(
|
||||
$qb->expr()->like('destination.product', ':search'),
|
||||
$qb->expr()->like('destination.hotel', ':search'),
|
||||
$qb->expr()->like('DATE_FORMAT(destination.dateFrom, \'%d.%m.%y\')', ':search'),
|
||||
$qb->expr()->like('DATE_FORMAT(destination.dateTo, \'%d.%m.%y\')', ':search')
|
||||
))
|
||||
->where(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->isNull('destination.deletedAt'),
|
||||
$qb->expr()->orX(
|
||||
$qb->expr()->like('destination.product', ':search'),
|
||||
$qb->expr()->like('destination.hotel', ':search'),
|
||||
$qb->expr()->like('DATE_FORMAT(destination.dateFrom, \'%d.%m.%y\')', ':search'),
|
||||
$qb->expr()->like('DATE_FORMAT(destination.dateTo, \'%d.%m.%y\')', ':search')
|
||||
))
|
||||
)
|
||||
->setParameter('search', '%'.$this->escapeLikeWildcards($search).'%')
|
||||
->orderBy('destination.dateFrom', 'ASC')
|
||||
->addOrderBy('destination.product', 'ASC')
|
||||
|
||||
Reference in new issue
Block a user