OpenJPA
  1. OpenJPA
  2. OPENJPA-1597

Need Compatibility setting for new OPENJPA-1097 Proxies and DetachedStateField behavior

    Details

      Description

      Need Compatibility setting for new Proxies and DetachedStateField behavior introduced in OPENJPA-1097 for legacy 1.0 persistence.xml apps, that rely on old behavior that using DetachedStateField=true would remove $proxy usage when serialized, but the new behavior is to keep the $proxy usage since we are serializing the StateManager into the object....

      1. OPENJPA-1597-12x-code.patch
        23 kB
        Donald Woods
      2. OPENJPA-1597-12x-tests.patch
        105 kB
        Donald Woods
      3. OPENJPA-1597-13x.patch
        18 kB
        Donald Woods
      4. OPENJPA-1597-13x-doc.patch
        3 kB
        Donald Woods
      5. OPENJPA-1597-20x-20100327.patch
        47 kB
        Donald Woods
      6. OPENJPA-1597-20x-docs.patch
        2 kB
        Donald Woods
      7. OPENJPA-1597-20x-tests.patch
        114 kB
        Donald Woods
      8. OPENJPA-1597-20x-tests-fix.patch
        2 kB
        Donald Woods
      9. OPENJPA-1597-trunk-20100327.patch
        10 kB
        Donald Woods
      10. OPENJPA-1597-trunk-compat.patch
        41 kB
        Donald Woods
      11. OPENJPA-1597-trunk-tests.patch
        114 kB
        Donald Woods
      12. OPENJPA-1597-trunk-tests-fix.patch
        2 kB
        Donald Woods

        Issue Links

          Activity

          Donald Woods created issue -
          Donald Woods made changes -
          Field Original Value New Value
          Link This issue is related to OPENJPA-1097 [ OPENJPA-1097 ]
          Donald Woods made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Donald Woods added a comment -

          Tests to verify any code changes fix the reported problem by allowing prior proxy behavior.

          Show
          Donald Woods added a comment - Tests to verify any code changes fix the reported problem by allowing prior proxy behavior.
          Donald Woods made changes -
          Attachment OPENJPA-1597-trunk-tests.patch [ 12439781 ]
          Attachment OPENJPA-1597-20x-tests.patch [ 12439782 ]
          Hide
          Donald Woods added a comment -

          Patches to fix test failure when run with other tests due to entity/table name collisions.
          Already checked into trunk as 927506 and 2.0.x as r927521.

          Show
          Donald Woods added a comment - Patches to fix test failure when run with other tests due to entity/table name collisions. Already checked into trunk as 927506 and 2.0.x as r927521.
          Donald Woods made changes -
          Attachment OPENJPA-1597-20x-tests-fix.patch [ 12439871 ]
          Attachment OPENJPA-1597-trunk-tests-fix.patch [ 12439872 ]
          Hide
          Donald Woods added a comment -

          Version of tests for 1.2.x showing expected behavior for 1.0 apps.

          Show
          Donald Woods added a comment - Version of tests for 1.2.x showing expected behavior for 1.0 apps.
          Donald Woods made changes -
          Attachment OPENJPA-1597-12x-tests.patch [ 12439875 ]
          Darren Woods committed 927794 (37 files)
          Reviews: none

          OPENJPA-1597 Tests to show expected detach/proxy/merge behavior for 1.0 apps

          openjpa 1.2.x
          Darren Woods committed 928128 (11 files)
          Darren Woods committed 928236 (1 file)
          Darren Woods committed 928247 (1 file)
          Reviews: none

          OPENJPA-1597 Fix a test failure on MSSQL. Merged in test code update from trunk r928241.

          Darren Woods committed 928249 (1 file)
          Reviews: none

          OPENJPA-1597 Fix a test failure on MSSQL. Merged in test code update from trunk r928241.

          Hide
          Donald Woods added a comment -

          Patches that add a new openjpa.Compatibility flag of IgnoreDetachedStateFieldForProxySerialization, which when 2.0 apps set to TRUE, will use the old 1.0 behavior for Proxies.writeReplace(), along with automatically using the old behavior for 1.0 apps.
          Patch file 20100327 reverts a previous addition of removing proxies when they are detached, which broke a detach/merge scenario when using proxied List collections.

          Show
          Donald Woods added a comment - Patches that add a new openjpa.Compatibility flag of IgnoreDetachedStateFieldForProxySerialization, which when 2.0 apps set to TRUE, will use the old 1.0 behavior for Proxies.writeReplace(), along with automatically using the old behavior for 1.0 apps. Patch file 20100327 reverts a previous addition of removing proxies when they are detached, which broke a detach/merge scenario when using proxied List collections.
          Donald Woods made changes -
          Attachment OPENJPA-1597-trunk-compat.patch [ 12439980 ]
          Attachment OPENJPA-1597-trunk-20100327.patch [ 12439981 ]
          Darren Woods committed 928271 (12 files)
          Reviews: none

          OPENJPA-1597 Revert code added to DetachManager to unproxy objects when detached in-place. Updated tests to verify old behavior of detached entites still having references, but that they are removed during serialization.

          Hide
          Donald Woods added a comment -

          compat+20100327 patches ported from trunk and combined into one patch and committed as r928271

          Show
          Donald Woods added a comment - compat+20100327 patches ported from trunk and combined into one patch and committed as r928271
          Donald Woods made changes -
          Attachment OPENJPA-1597-20x-20100327.patch [ 12439985 ]
          Darren Woods committed 928845 (1 file)
          Reviews: none

          OPENJPA-1597 Migration doc updates to mention the new Compatibility flag.

          Hide
          Donald Woods added a comment -

          Doc updates for new Compatibility option.

          Show
          Donald Woods added a comment - Doc updates for new Compatibility option.
          Donald Woods made changes -
          Attachment OPENJPA-1597-20x-docs.patch [ 12440084 ]
          Darren Woods committed 928853 (1 file)
          Reviews: none

          OPENJPA-1597 cleanup code comments. merged in from 2.0.x.

          Darren Woods committed 928854 (1 file)
          Reviews: none

          OPENJPA-1597 Migration doc updates to mention the new Compatibility flag.

          Darren Woods committed 929550 (1 file)
          Reviews: none

          OPENJPA-1597 merge in code comment updates from 2.0.x branch

          Darren Woods committed 929561 (1 file)
          Darren Woods committed 929599 (41 files)
          Reviews: none

          OPENJPA-1597 Add new TestDetachMerge tests from 1.2.x/2.0/trunk. Revert DetachManager and Proxies changes made in OPENJPA-1097 so the code behaves the same as 1.2.x again. Will back port Compatibility changes from 2.0/2.1 next.

          openjpa 1.3.x
          Hide
          Donald Woods added a comment -

          Add Compatibility option to use new 2.0 behavior of removing proxy classes unless DetachedStateField=true, but default is still the old behavior.

          Show
          Donald Woods added a comment - Add Compatibility option to use new 2.0 behavior of removing proxy classes unless DetachedStateField=true, but default is still the old behavior.
          Donald Woods made changes -
          Attachment OPENJPA-1597-13x.patch [ 12440434 ]
          Darren Woods committed 930875 (1 file)
          Hide
          Donald Woods added a comment -

          Update to 1.3.x docs to mention $proxy problem during serialization and how to use the new compatibility property.

          Show
          Donald Woods added a comment - Update to 1.3.x docs to mention $proxy problem during serialization and how to use the new compatibility property.
          Donald Woods made changes -
          Attachment OPENJPA-1597-13x-doc.patch [ 12440760 ]
          Hide
          Donald Woods added a comment -

          Patch that adds the openjpa.Compatibility property and behavior for IgnoreDetachedStateFieldForProxySerialization, along with doc and test updates.

          Show
          Donald Woods added a comment - Patch that adds the openjpa.Compatibility property and behavior for IgnoreDetachedStateFieldForProxySerialization, along with doc and test updates.
          Donald Woods made changes -
          Attachment OPENJPA-1597-12x-code.patch [ 12440768 ]
          Darren Woods committed 930888 (1 file)
          Reviews: none

          OPENJPA-1597 Update docs to mention previous serialization side effects

          Darren Woods committed 930896 (1 file)
          Reviews: none

          OPENJPA-1597 Update docs to mention previous serialization side effects

          Hide
          Donald Woods added a comment -

          Default behavior updated in 2.0. Prior 1.3.x requires usage of Compatibility property to use the new behavior. Patch attached for 1.2.x if we ever decide to apply it there.

          Show
          Donald Woods added a comment - Default behavior updated in 2.0. Prior 1.3.x requires usage of Compatibility property to use the new behavior. Patch attached for 1.2.x if we ever decide to apply it there.
          Donald Woods made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 1.3.0 [ 12313326 ]
          Resolution Fixed [ 1 ]
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Show more

            People

            • Assignee:
              Donald Woods
              Reporter:
              Donald Woods
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development