Michael Kunze wrote:

Gilles Taurel wrote:

Criteria c = new Criteria();
c.add(BaseClassPeer.FIELD,(Object) (" valid_from is null and valid_to is
null  or valid_from is null and '2005-02-14' < valid_to  or valid_from <=
'2005-02-14' and valid_to is null or valid_from <= '2005-02-14' and
'2005-02-14'  < valid_to "),Criteria.CUSTOM);

That looks kinda ugly, but'll try thanks. I thought there is a way via
c.and() c.or() but couldn't figure out how to combine them.

Try to use Criterions .... and make and, or operations on them ..
I think this will work.

Best,

Sergiu


Reply via email to