hi this is not really a problem i just want to understand why:
in postgres 9
this_.lastModified<=NULL
evaluates to true, why? lastModified is a timestamp without timezone
i think it would be more logic to interpret it like "this_.lastModified<=0" which should evaluate to false if 0 is the lowest date and lastModified is a normal date
the complete query looks like this
select
this_.*
from Entity this_
inner join DEntity d2_ on this_.device=d2_.id
inner join u u1_ on this_.learner=u1_.userID
inner join LMEntity m3_ on this_.method=m3_.id
where u1_.userID='XXXX' and not (d2_.hardwareID='muh' and this_.timestamp='2013-08-02 00:00:00' and m3_.id=0 and this_.lastModified<=NULL)
true? Can you give an example row where you think it evaluates to true?