OpenJPA
  1. OpenJPA
  2. OPENJPA-1964

Cascade on persist does not correctly cascade all objects in the graph

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: jpa
    • Labels:
      None
    • Environment:
      Sun JDK 1.6

      Description

      We're currently building a Cassandra adapter for OpenJPA. In doing so we've encountered an issue that I think may be a bug. We have our test cases and source available here.

      https://github.com/riptano/hector-jpa/blob/master/src/test/java/com/datastax/hectorjpa/store/ManyToManyIndexTest.java

      Essentially, the test constructs the following relationships.

      User A one-many> Observe -many-one-> User B

      Essentially our test models what is functionally a many-many with additional meta.

      When CassandraStoreManager.flush is called only UserA and Observe are in the pNew collection. Where User A, Observer and User B should be in pNew since all cascade on persist.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Todd Nine
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development