OpenJPA
  1. OpenJPA
  2. OPENJPA-2282

ESCAPE '\' is appended to the like clause unexpectedly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.0
    • Component/s: sql
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      When I run the unit test on TestEJBQLCondExpression.testLikeExpr, I noticed that ESCAPE '\' is appended to the like clause unexpectedly. This could cause the wrong query result.

      1. OPENJPA-2282.patch
        7 kB
        Helen Xu
      2. OPENJPA-2282Doc.patch
        2 kB
        Helen Xu

        Issue Links

          Activity

          Hide
          Helen Xu added a comment -

          fix and unit test attached

          Show
          Helen Xu added a comment - fix and unit test attached
          Hide
          Helen Xu added a comment -

          attached the doc change

          Show
          Helen Xu added a comment - attached the doc change
          Hide
          Helen Xu added a comment -

          The fix and migration doc are added to trunk

          Show
          Helen Xu added a comment - The fix and migration doc are added to trunk
          Hide
          Gary Shank added a comment -

          I was running with openjpa-all-2.2.2 and I was getting ESCAPE's when LIKE was used but now, with v2.3.0, I don't see any ESCAPE's at all for any LIKE's.

          Show
          Gary Shank added a comment - I was running with openjpa-all-2.2.2 and I was getting ESCAPE's when LIKE was used but now, with v2.3.0, I don't see any ESCAPE's at all for any LIKE's.
          Hide
          Rick Curtis added a comment -

          Gary -

          Please take a look at the migration guide[1] for 2.3.0 as it looks like that behavior changed.

          [1] http://ci.apache.org/projects/openjpa/trunk/docbook/manual.html#jpa_2.3_RequiresSearchStringEscapeForLike

          Show
          Rick Curtis added a comment - Gary - Please take a look at the migration guide [1] for 2.3.0 as it looks like that behavior changed. [1] http://ci.apache.org/projects/openjpa/trunk/docbook/manual.html#jpa_2.3_RequiresSearchStringEscapeForLike

            People

            • Assignee:
              Helen Xu
              Reporter:
              Helen Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development