There is one-2-many relation between Property and Reservation. Property has column called 'nr_of_bookings'. I need DQL that will retrieve only the properties that has COUNT(Reservation) less than Property.nr_of_bookins.
An example: Some Property has nr_of_bookings = 3 . If it has 5 Reservations related, it will not be retrieved. But if it has 2 related Reservations, it will be retrieved.
I tried numerous combinations, but I miss something obviosly. I posted similar question here , but it is better to start from scratch. Thanks.