glassfish
  1. glassfish
  2. GLASSFISH-990

? AND # SYMBOLS CAN'T BE USED IN NATIVE QUERY

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.1pe
    • Fix Version/s: not determined
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      990
    • Status Whiteboard:
      Hide

      HIGH

      Show
      HIGH

      Description

      Also logged as TopLink Also logged as TopLink bug 5472919.
      ? denotes positional parameter in native queries:
      "select * from CMP3_ADDRESS where city=?"
      or
      "select * from CMP3_ADDRESS where city=?1"

      However if ? are found in a literal - where it shouldn't be interpreted as a
      parameter - the query fails:
      "select * from CMP3_ADDRESS where city='?'"
      The same with #:
      "select * from CMP3_ADDRESS where city='#'".
      ? denotes positional parameter in native queries:
      "select * from CMP3_ADDRESS where city=?"
      or
      "select * from CMP3_ADDRESS where city=?1"

      However if ? are found in a literal - where it shouldn't be interpreted as a
      parameter - the query fails:
      "select * from CMP3_ADDRESS where city='?'"
      The same with #:
      "select * from CMP3_ADDRESS where city='#'"

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            ailitche
            Reporter:
            ailitche
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: