Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1404

ClassCastException during ObjectDetachOperation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0RC2
    • 3.0RC3
    • ROP
    • None

    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)

      Attachments

        Activity

          People

            antidote Andrey Razumovsky
            xor Neil Rutherford
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: