Hi,

Le 11 avr. 2006, à 15:08, Kieran Kelleher a écrit :
When I include this qualifier in a qualifier constructed of other qualifiers ANDed and ORed, I get the stack trace shown below. If I leave it out of the qualifier construct, I have no problems. Any idea why this is wrong? endDate is an NSTimestamp mapped to DateTime column.

            EOQualifier endEqualsNullQualifier = new EOKeyValueQualifier( "endDate",                     EOQualifier.QualifierOperatorEqual, NSKeyValueCoding.NullValue );

The log output and error stack trace:

17018 DEBUG [Thread-1] (STEDispatcher, processScheduledTasks, 90) -
totalQualifier = ((startDate <= (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT') and ((endDate = null), (endDate >= (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT')) and (nextEventDue < (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT'))

17020 DEBUG [Thread-1] (STEDispatcher, processScheduledTasks, 104) -
Fetch Spec = <class com.webobjects.eocontrol.EOFetchSpecification(entityName=CTScheduledTas k, qualifier=((startDate <= (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT') and ((endDate = null), (endDate >= (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT')) and (nextEventDue < (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT')),
isDeep=false, usesDistinct=false,
sortOrdering=(<class com.webobjects.eocontrol.EOSortOrdering(nextEventDue compareAscending)>),
hints=null,
_prefetchingRelationshipKeyPaths = null)>

17328 ERROR [Thread-1] (STEDispatcher, processScheduledTasks, 152) -
Exception while processing scheduled tasks

java.lang.ClassCastException
at com.webobjects.eoaccess.EOQualifierSQLGeneration$_AndQualifierSupport.s chemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:501)


Well, it appears to me that maybe there is something wrong in your EOAndQualifier. Is it possible that at least one object in EOAndQualifier array is not a EOQualifier subclass, i.e. a NSArray instead? The following string representation is odd:

... and ((endDate = null), (endDate >= (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT')) and ...

Shouldn't be this instead?


... and (endDate = null) and (endDate >= (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT') and ...

Or even this:

... and ((endDate = null) and (endDate >= (com.webobjects.foundation.NSTimestamp)'2006-04-11 16:36:06 Etc/GMT')) and ...


--
Francis Labrie
Saint-Bruno-de-Montarville, Quebec, Canada

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to