Description
I have modeled a too-many relationship as a map, when executing a query with a prefetch for this relationship (in my ROP client) I get the following:
java.lang.ClassCastException: org.apache.cayenne.util.PersistentObjectMap cannot be cast to java.util.Collection
at org.apache.cayenne.util.ObjectDetachOperation$1.visitToMany(ObjectDetachOperation.java:131)
at org.apache.cayenne.reflect.generic.DataObjectToManyProperty.visit(DataObjectToManyProperty.java:111)
at org.apache.cayenne.reflect.PersistentDescriptor.visitSuperProperties(PersistentDescriptor.java:360)
at org.apache.cayenne.reflect.PersistentDescriptor.visitProperties(PersistentDescriptor.java:402)
at org.apache.cayenne.reflect.LazyClassDescriptorDecorator.visitProperties(LazyClassDescriptorDecorator.java:179)
at org.apache.cayenne.util.ObjectDetachOperation.detach(ObjectDetachOperation.java:98)