Category: criteria

Doctrine Criteria expression value : static values not seen, QueryException awaiting for parameters

I’m using Doctrine Criteria to avoid repeating some filtering business logic. Since my comparison values are static, I first passed them directly in the ->expr() conditions : /** * @return DoctrineCommonCollectionsCriteria */ public function lastContratCriteria() { $criteria = Criteria::create(); $baseCondition…

expr() method in Doctrine Criteria demand bound parameters, otherwise triggers a QueryException

I’m using Doctrine Criteria class to avoid repeating some filtering business logic. Since my comparison values are static, I first passed them directly in the ->expr() conditions : /** * @return DoctrineCommonCollectionsCriteria */ public function lastContratCriteria() { $criteria = Criteria::create();…