cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jurgen Doll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-1834) Exception: ToManyList cannot be cast to DataObject
Date Mon, 05 Aug 2013 14:20:48 GMT

    [ https://issues.apache.org/jira/browse/CAY-1834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13729532#comment-13729532
] 

Jurgen Doll commented on CAY-1834:
----------------------------------

Thanks.
                
> Exception: ToManyList cannot be cast to DataObject
> --------------------------------------------------
>
>                 Key: CAY-1834
>                 URL: https://issues.apache.org/jira/browse/CAY-1834
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1B2
>            Reporter: Jurgen Doll
>             Fix For: 3.2M2
>
>         Attachments: 0001-xx.patch, VisionsMap.map.xml
>
>
> I have an entity called Activity with a M-N relationship to ActivityResults (No middle
or linking table).
> The relationship getResults() returns a MAP<name,ActivityResults>, but the exception
also occurs when using a List<ActivityResults>.
> I have found that selecting "To Many" on the dbEntity backing the child class (ActivityResults)
produces the exception. While switching "To Many" off removes the exception and commits succesfully.
> If an existing ActivityResult is modified and the Activity is then committed the updates
related to the ActivityResults are "successful", but rolled back as an exception is thrown
when post-processing Activity:
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message