Hello,
I'm trying to create a query which would return all EntityA entries that do not have an entry in `tests` with a date greater than the current year. I think I need something like NOT EXISTS in the query. EntityA has relation called 'tests'
I'm trying to create a query which would return all EntityA entries that do not have an entry in `tests` with a date greater than the current year. I think I need something like NOT EXISTS in the query. EntityA has relation called 'tests'
PHP Code:
$collection = $this->entityManager
->getRDBRepository('EntityA')
->distinct()
->join('tests')
->where([
'tests.date<' => (new \DateTimeImmutable)->format('Y-01-01 00:00:00'),
])
->find();
Comment