Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2506

StoreCache interface doesn't work for many ID types

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, 2.1.1, 2.2.2, 2.3.0, 2.4.0
    • Fix Version/s: 2.1.2, 2.2.1.1, 2.2.3, 2.4.0
    • Component/s: datacache, kernel
    • Labels:
      None

      Description

      While doing some internal testing, it was discovered that the javax.persistence.Cache.contains(Class, Object) method doesn't work for a number of id types. The implementation depends on JPAFacade helper to convert user provided [Class, Object] into a proper OpenJPAId, but it doesn't work in all cases.

        Issue Links

          Activity

          Hide
          dalia Dalia Abo Sheasha added a comment -

          I attached a patch where I replaced JPAFacadeHelper's OpenJPAObjectId conversion with one that mimics how BrokerImpl does the conversion. I also fixed TestJPAFacadeHelper because it was testing the wrong behavior and added a few more tests for various Id types.

          Show
          dalia Dalia Abo Sheasha added a comment - I attached a patch where I replaced JPAFacadeHelper's OpenJPAObjectId conversion with one that mimics how BrokerImpl does the conversion. I also fixed TestJPAFacadeHelper because it was testing the wrong behavior and added a few more tests for various Id types.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1603251 from Rick Curtis in branch 'openjpa/trunk'
          [ https://svn.apache.org/r1603251 ]

          OPENJPA-2506: Update JPAFacadeHelper to properly create an OpenJPA identity object. Patch contributed by Dalia Abo Sheasha.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1603251 from Rick Curtis in branch 'openjpa/trunk' [ https://svn.apache.org/r1603251 ] OPENJPA-2506 : Update JPAFacadeHelper to properly create an OpenJPA identity object. Patch contributed by Dalia Abo Sheasha.
          Hide
          curtisr7 Rick Curtis added a comment -

          Committed revision 1603251 to trunk. Thanks for the patch Dalia!

          Show
          curtisr7 Rick Curtis added a comment - Committed revision 1603251 to trunk. Thanks for the patch Dalia!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1648430 from Heath Thomann in branch 'openjpa/branches/2.1.x'
          [ https://svn.apache.org/r1648430 ]

          OPENJPA-2506: StoreCache interface doesn't work for many ID types - back ported Dalia's fix to 2.1.x.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1648430 from Heath Thomann in branch 'openjpa/branches/2.1.x' [ https://svn.apache.org/r1648430 ] OPENJPA-2506 : StoreCache interface doesn't work for many ID types - back ported Dalia's fix to 2.1.x.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1648450 from Heath Thomann in branch 'openjpa/branches/2.2.1.x'
          [ https://svn.apache.org/r1648450 ]

          OPENJPA-2506: StoreCache interface doesn't work for many ID types - back ported Dalia's fix to 2.2.1.x.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1648450 from Heath Thomann in branch 'openjpa/branches/2.2.1.x' [ https://svn.apache.org/r1648450 ] OPENJPA-2506 : StoreCache interface doesn't work for many ID types - back ported Dalia's fix to 2.2.1.x.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1648455 from Heath Thomann in branch 'openjpa/branches/2.2.x'
          [ https://svn.apache.org/r1648455 ]

          OPENJPA-2506: StoreCache interface doesn't work for many ID types - back ported Dalia's fix to 2.2.x.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1648455 from Heath Thomann in branch 'openjpa/branches/2.2.x' [ https://svn.apache.org/r1648455 ] OPENJPA-2506 : StoreCache interface doesn't work for many ID types - back ported Dalia's fix to 2.2.x.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1677238 from Jody Grassel in branch 'openjpa/branches/2.2.x'
          [ https://svn.apache.org/r1677238 ]

          OPENJPA-2506: Add serialVersionUID to ClassMetaData

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1677238 from Jody Grassel in branch 'openjpa/branches/2.2.x' [ https://svn.apache.org/r1677238 ] OPENJPA-2506 : Add serialVersionUID to ClassMetaData

            People

            • Assignee:
              curtisr7 Rick Curtis
              Reporter:
              curtisr7 Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development