persistence@glassfish.java.net

[Fwd: [Issue 990] New - ? AND # SYMBOLS CAN'T BE USED IN NATIVE QUERY]

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Wed, 23 Aug 2006 09:32:05 -0700

Andrei,

Does TopLink support repeated parameters in native queries, e.g.
"select * from ... where columnA=?1 or columnB=?1"

thanks,
-marina

-------- Original Message --------
From: ailitche_at_dev.java.net
Subject: [Issue 990] New - ? AND # SYMBOLS CAN'T BE USED IN NATIVE QUERY
To: issues_at_glassfish.dev.java.net

https://glassfish.dev.java.net/issues/show_bug.cgi?id=990
                  Issue #|990
                  Summary|? AND # SYMBOLS CAN'T BE USED IN NATIVE QUERY
                Component|glassfish
                  Version|9.1pe
                 Platform|All
               OS/Version|All
                      URL|
                   Status|NEW
        Status whiteboard|
                 Keywords|
               Resolution|
               Issue type|DEFECT
                 Priority|P3
             Subcomponent|entity-persistence
              Assigned to|ailitche
              Reported by|ailitche






------- Additional comments from ailitche_at_dev.java.net Wed Aug 23 14:33:10 +0000
2006 -------
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='#'"

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: issues-help_at_glassfish.dev.java.net