db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murvai-Buzogány László <laszlo.murvai-buzog...@t-sys.hu>
Subject Re: Question with "addDate" and "andDate"!
Date Fri, 01 Aug 2003 17:02:02 GMT

I thought it would give the same error. Though, it was my mistake thinking
that this was like a ¨bug¨. After having a look at the docs, I found this
in the Criteria-howto:
Criteria criteria = new Criteria();
criteria.add(InvoicePeer.COST, 1000, Criteria.GREATER_EQUAL);
Criteria.Criterion criterion = criteria.getCriterion(InvoicePeer.COST);
                             new Integer(5000),
                             Criteria.LESS_EQUAL )

There is also an explanation available, which clearly says why it has to be
done like this.


On Fri, Aug 01, 2003 at 11:59:32PM +0800, sailorhero wrote:
> I understand the diffrent .
> But i use the method which you said,It is also wrong.
> Just like I used andDate().
> I use Torque3.0.2.
> Which version has fixed this error?
> code:
>    crit1.clear();
>    crit1.addDate(BookPeer.TIME,2003,7,1,Criteria.GREATER_EQUAL);
>    crit1.and(BookPeer.TIME, new GregorianCalendar(2003, 7, 1),Criteria.LESS_EQUAL);

Murvai-Buzogány László
T-Sys Kft.
Software developer
Tel.: (06)-1 436-8725 

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

View raw message