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

ToMany Map relationships cause ClassCastExceptions on commit when the source is Fault

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0M3
    • None
    • None

    Description

      Related to the recent new feature CAY-848... In some cases commit fails with this error. The fault referred in the stack is a source of the to-many map relationship.

      Caused by: java.lang.ClassCastException: org.apache.cayenne.access.ToOneFault
      at org.apache.cayenne.reflect.generic.DataObjectBaseProperty.toDataObject(DataObjectBaseProperty.java:96)
      at org.apache.cayenne.reflect.generic.DataObjectBaseProperty.readPropertyDirectly(DataObjectBaseProperty.java:69)
      at org.apache.cayenne.reflect.generic.DataObjectToManyProperty.isFault(DataObjectToManyProperty.java:105)
      at org.apache.cayenne.access.DataDomainSyncBucket.postprocess(DataDomainSyncBucket.java:248)
      at org.apache.cayenne.access.DataDomainFlushAction.postprocess(DataDomainFlushAction.java:240)
      at org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:148)
      at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:827)
      at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:794)
      at org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:853)
      at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:791)
      at org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1170)
      ... 68 more

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: