Uploaded image for project: 'Hibernate OGM'
  1. OGM-1512

Flush operation after a cascade delete could prejudice commit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.0.Beta2
    • Fix Version/s: 5.4.0.CR1
    • Component/s: infinispan
    • Labels:
      None

      Description

      With Infinispan remote dialect, a large cascade delete on a bidirectional association and a subsequent flush could bring persistence context in an inconsistent state, causing in turn this error on commit operation:

      `javax.persistence.RollbackException: Error while committing the transaction
      at org.hibernate.ogm.backendtck.inheritance.singletable.family.SingleTableInheritancePersistTest.testFlushAndCommitAfterCascadeDelete(SingleTableInheritancePersistTest.java:192)
      Caused by: java.lang.IllegalStateException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : org.hibernate.ogm.backendtck.inheritance.singletable.family.Woman.familyName -> org.hibernate.ogm.backendtck.inheritance.singletable.family.Family
      at org.hibernate.ogm.backendtck.inheritance.singletable.family.SingleTableInheritancePersistTest.testFlushAndCommitAfterCascadeDelete(SingleTableInheritancePersistTest.java:192)
      Caused by: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : org.hibernate.ogm.backendtck.inheritance.singletable.family.Woman.familyName -> org.hibernate.ogm.backendtck.inheritance.singletable.family.Family
      `
      Test case is here:
      Test_flush_and_commit_after_a_cascade_delete_on_bidirectional_association.patch

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: