OpenJPA
  1. OpenJPA
  2. OPENJPA-487

Generated SUBSTRING SQL is ugly and inefficient

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.0, 0.9.6, 0.9.7, 1.0.0, 1.0.1, 1.0.2, 1.1.0
    • Fix Version/s: 2.2.0
    • Component/s: sql
    • Labels:
      None

      Description

      When performing a JPQL query with a SUBSTRING clause, OpenJPA converts from one-based index + length parameters to zero-based index + end index for internal handling, and then re-converts back to one-based + length when generating SQL. This conversion is entirely performed in query values, so the generated SQL has a lot of math in it. This extra math is never necessary.

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Milosz Tylenda
              Reporter:
              Patrick Linskey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development