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

A 'find' or 'query' may return multiple instances of Entities which contain Embeddables, where the Embeddables use String identities, if the id value has trailing spaces.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 1.2.2, 1.3.0, 2.0.0
    • None
    • kernel
    • None

    Description

      This issue is very similar to that of OPENJPA-1501, with one twist.......I've found that when you have an Embeddable, which has Strings as the keys/ids, openJPA code puts the Embeddable into an ObjectID by design, rather than a StringID....recall, the fix to OJ1501 was to strip white space from the end of a user's String key when that String was placed into a StringID. So, the strings in an Embeddable would also need to be stripped, just as was done in OJ-1501, but unfortunately it would seem to be harder to do so for Embeddables since openJPA code doesn't necessarily know what types are contained in the Embed.
      I've created a JUnit test case which has three test methods. The test is attached here.

      Attachments

        1. OPENJPA-1854-1.2.x.test
          13 kB
          Heath Thomann

        Issue Links

          Activity

            People

              jpaheath Heath Thomann
              jpaheath Heath Thomann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: