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

        Michael Dick made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Donald Woods made changes -
        Assignee Donald Woods [ drwoods ]
        Patch Info [Patch Available]
        Michael Dick made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Michael Dick added a comment -

        Reopening issues with WriteBehind.

        Show
        Michael Dick added a comment - Reopening issues with WriteBehind.
        Michael Dick made changes -
        Affects Version/s 2.1.0 [ 12314542 ]
        Affects Version/s 2.0.0-M3 [ 12314148 ]
        Fix Version/s 2.1.0 [ 12314542 ]
        Fix Version/s 2.0.0-beta [ 12314149 ]
        Donald Woods made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Donald Woods added a comment -

        applied patch from Fay to trunk

        Show
        Donald Woods added a comment - applied patch from Fay to trunk
        Donald Woods made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Donald Woods made changes -
        Assignee Michael Dick [ mikedd ] Donald Woods [ drwoods ]
        Fix Version/s 2.0.0-M4 [ 12314149 ]
        Affects Version/s 2.0.0-M3 [ 12314148 ]
        Patch Info [Patch Available]
        Priority Minor [ 4 ] Major [ 3 ]
        Component/s writebehind [ 12312973 ]
        Fay Wang made changes -
        Attachment OPENJPA-1348.patch [ 12426948 ]
        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.
        Michael Dick made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        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....
        Tim McConnell made changes -
        Field Original Value New Value
        Summary Embeddable data not persisted when using WriteBehind cache Embeddable data not persisted when using WriteBehind cache flush operation
        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.....
        Tim McConnell created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development