cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@xsinet.co.za
Subject ToManyList cannot be cast to DataObject
Date Thu, 06 Jun 2013 16:22:52 GMT
Hi All

I need some help in resolving an error using Cayenne v.3.1B2 Feb 07 2013
18:36:43

I have an entity called Activity with a M-N relationship to ActivityResults.
The relationship getResults() returns a MAP<name,ActivityResults>.

New Activities with related ActivityResults commit (and updates in the
same session) without error.

However if a previously existing ActivityResult is modified and the
Activity is then committed the following error is produced:

java.lang.ClassCastException: org.apache.cayenne.access.ToManyList cannot
be cast to org.apache.cayenne.DataObject
	at
org.apache.cayenne.reflect.generic.DataObjectBaseProperty.toDataObject(DataObjectBaseProperty.java:97)
	at
org.apache.cayenne.reflect.generic.DataObjectBaseProperty.readPropertyDirectly(DataObjectBaseProperty.java:70)
	at
org.apache.cayenne.reflect.generic.DataObjectToManyProperty.isFault(DataObjectToManyProperty.java:106)
	at
org.apache.cayenne.access.DataDomainSyncBucket.postprocess(DataDomainSyncBucket.java:257)


Any help resolving this would be appreciated.
Thanks, Jurgen



Mime
View raw message