I would like to know what it is preferable for the optimisation between 2 approachs in ORM.
- I create a QueryBuilder with conditions of my object and get an array of the Objects respecting my conditions of queries
- and get all Objects with
getDoctrine()->findAll()and then check in php the conditions that I applied on my objects
I wonder it especially in the case of hotel booking and the availbility of some rooms. This kind of search includes a lot of different entities with complex queries. Just thinking about the querybuilder makes me an headache... But i'm not sure that's the best way to populate all entites in php and then apply my functions....