newbie: using timestamp in criteria, compound primary key

2004-07-16 Thread jonathan . lister
I am trying to limit a select from a logtable to the last so many days worth of entries, but I get a class cast exception. Other criteria on same table work OK, so I'm sure most of the setup is good. Am I missing something really obvious? Is there an example available for querying by timestamp?

Re: newbie: using timestamp in criteria, compound primary key

2004-07-16 Thread Thomas Dudziak
[EMAIL PROTECTED] wrote: I am trying to limit a select from a logtable to the last so many days worth of entries, but I get a class cast exception. Other criteria on same table work OK, so I'm sure most of the setup is good. Am I missing something really obvious? Is there an example available for

RE: newbie: using timestamp in criteria, compound primary key

2004-07-16 Thread jonathan . lister
: org.apache.ojb.broker.PersistenceBrokerException -Original Message- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: 16 July 2004 13:07 To: OJB Users List Subject: Re: newbie: using timestamp in criteria, compound primary key [EMAIL PROTECTED] wrote: I am trying to limit a select from a logtable to the last so many days worth

Re: newbie: using timestamp in criteria, compound primary key

2004-07-16 Thread Thomas Dudziak
[EMAIL PROTECTED] wrote: oops, here is the output exception. Using OJB 1.0rc7 stable INFO: adding criteria greater than log_time 2004-07-14 12:26:52.578 16-Jul-2004 12:26:53 com.vaisala.ice.vmdbReport.view.IpmLogDAO getRecentActivity INFO: calling getCollectionByQuery 04/07/16 12:26:53

Re: newbie: using timestamp in criteria, compound primary key

2004-07-16 Thread Thomas Dudziak
[EMAIL PROTECTED] wrote: very similar results using 1.0.0 final: (I really should read mails more thouroughly :-) ) The problem seems to be that you used the wrong method on the criteria object: criteria.addGreaterThanField(log_time, t); This method is intended to be used when comparing *with*

RE: newbie: using timestamp in criteria, compound primary key

2004-07-16 Thread jonathan . lister
excellent, works a treat now, many thanks ! -Original Message- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: 16 July 2004 14:33 To: OJB Users List Subject: Re: newbie: using timestamp in criteria, compound primary key [EMAIL PROTECTED] wrote: very similar results using 1.0.0