Not using Map relationships myself that much, but looking at the sources, this might be a bug. Could you open a Jira please (if possible, including the DataMap XML file)?
Andrus On Jun 6, 2013, at 7:22 PM, [email protected] wrote: > 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 > > >
