db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: multiple criteria on the same field
Date Sun, 10 May 2009 12:36:37 GMT
Ivano Luberti wrote:
> Can someone suggest the best practice to do this with Torque ?

I suggest the following:

---8<---
Criteria criteria = new Criteria();

criteria.add(IscrizioniSocioPeer.STARTTIME,
(Date) (formUser.getDataIscrizioneInizio()), Criteria.GREATER_EQUAL);

criteria.and(IscrizioniSocioPeer.STARTTIME,
(Date) (formUser.getDataIscrizioneFine()), Criteria.LESS_EQUAL);
---8<---

What were you planning to achieve with
dataIscrizioneFine.setIgnoreCase(true)? The value is a Date object.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message