OpenJPA
  1. OpenJPA
  2. OPENJPA-1501

EntityManager.find may return multiple instances of Entities with String identities if id value has trailing spaces.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 1.3.0, 2.0.0
    • Fix Version/s: 1.3.0, 2.0.2, 2.1.0
    • Component/s: kernel
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      As noted on the OpenJPA users mailing list at http://n2.nabble.com/EntityManager-fetch-and-query-by-key-behave-differently-tp4165833p4165833.html

      The find operation doesn't properly handle trailing whitespace in a String ID.

      1. OPENJPA-1501.2.0.x.patch.txt
        8 kB
        Michael Dick
      2. OPENJPA-1501.trunk.patch.txt
        8 kB
        Michael Dick

        Issue Links

          Activity

          Hide
          Heath Thomann added a comment -

          HI! The above Nabble link doesn't work for me any longer.....I've been trying it at random times over the past 24hrs. I'm assuming the link no longer exists. In case others experience similar behavior, I did find the same info on MarkMail here:

          http://openjpa.markmail.org/search/?q=EntityManager-fetch-and-query-by-key-behave-differently#query:EntityManager-fetch-and-query-by-key-behave-differently+page:1+mid:yg5quqhot3hcreuw+state:results

          Thanks,

          Heath

          Show
          Heath Thomann added a comment - HI! The above Nabble link doesn't work for me any longer.....I've been trying it at random times over the past 24hrs. I'm assuming the link no longer exists. In case others experience similar behavior, I did find the same info on MarkMail here: http://openjpa.markmail.org/search/?q=EntityManager-fetch-and-query-by-key-behave-differently#query:EntityManager-fetch-and-query-by-key-behave-differently+page:1+mid:yg5quqhot3hcreuw+state:results Thanks, Heath

            People

            • Assignee:
              Michael Dick
              Reporter:
              Michael Dick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development