OpenJPA
  1. OpenJPA
  2. OPENJPA-1296 WriteBehindCache Problems
  3. OPENJPA-1348

Embeddable data not persisted when using WriteBehind cache flush operation

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: writebehind
    • Labels:
      None

      Description

      When using an entity that includes an embeddable with the WriteBehind cache flush operation all the data associated with the entity is properly persisted in the database. However, none of the data associated with the embeddable is persisted. A testcase will be provided to demonstrate this failure.....

        Activity

        Hide
        Tim McConnell added a comment -

        See openjpa-persistence-jdbc\src\test\java\org\apache\openjpa\jdbc\writebehind\crud\TestEmbeddable.java and uncomment the testEntity01ManualFlush() method to see the failure....

        Show
        Tim McConnell added a comment - See openjpa-persistence-jdbc\src\test\java\org\apache\openjpa\jdbc\writebehind\crud\TestEmbeddable.java and uncomment the testEntity01ManualFlush() method to see the failure....
        Hide
        Fay Wang added a comment -

        The problem that the embeddable fields are not persisted using WriteBehindCache is that WriteBehindCallback has its own BrokerImpl, which is different from the BrokerImpl in the embeddable's StateManagerImpl. As a result, the StateManagerImpl of the embeddable can not be fetched. The attached patch is to set a flag to indicate whether a particular BrokerImpl is from WriteBehindCallback.

        Show
        Fay Wang added a comment - The problem that the embeddable fields are not persisted using WriteBehindCache is that WriteBehindCallback has its own BrokerImpl, which is different from the BrokerImpl in the embeddable's StateManagerImpl. As a result, the StateManagerImpl of the embeddable can not be fetched. The attached patch is to set a flag to indicate whether a particular BrokerImpl is from WriteBehindCallback.
        Hide
        Donald Woods added a comment -

        applied patch from Fay to trunk

        Show
        Donald Woods added a comment - applied patch from Fay to trunk
        Hide
        Michael Dick added a comment -

        Reopening issues with WriteBehind.

        Show
        Michael Dick added a comment - Reopening issues with WriteBehind.

          People

          • Assignee:
            Unassigned
            Reporter:
            Tim McConnell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development