[DDC-2149] lte with or conditional not working Created: 16/Nov/12  Updated: 06/Jan/13  Resolved: 06/Jan/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: 2.1.7
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: jhvaras Assignee: Benjamin Eberlei
Resolution: Cannot Reproduce Votes: 0
Labels: lte
Environment:

Symfony 2.0.x


Attachments: Text File ddc2149.patch    

 Description   

$qb->select(array('c.id'))
->from('Veiss\BoletusBundle\Entity\Calendar', 'c')
->where("(c.endDate >= 111) OR (c.startDate >= 222)")

returns correctly:
"SELECT c0_.id AS id0 FROM Calendar c0_ WHERE (c0_.endDate >= 111) OR (c0_.startDate >= 222)"

but lte condition:
->where("(c.endDate <= 111) OR (c.startDate >= 222)")

returns incorrectly:
"SELECT c0_.id AS id0 FROM Calendar c0_ WHERE (c0_.endDate = 222)"

I have tested that an same occurs with "expr()->lte"



 Comments   
Comment by jhvaras [ 16/Nov/12 ]

Tested and issued in v2.1.7

Comment by Marco Pivetta [ 16/Nov/12 ]

Can you please try upgrading? 2.1.x won't get any more updates as far as I know.

Comment by jhvaras [ 16/Nov/12 ]

Hi Marco,

We cannot upgrade as we are developing under Symfony 2.0

Thx

Comment by Benjamin Eberlei [ 06/Jan/13 ]

Cannot reproduce issue with the attached test-case. Works perfectly with 2.1.7

Generated at Sun Aug 31 06:24:44 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.