openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Commented: (OPENJPA-893) SQLStoreQuery does not support named parameters
Date Tue, 03 Feb 2009 21:21:59 GMT


Pinaki Poddar commented on OPENJPA-893:

SQL queries are not parsed by OpenJPA. They are only scanned for parameter markers.
Two slightly different falvors of parameter marker is supported: 
a)   "SELECT p FROM Person p WHERE AND p.age > ?2"
b)  "SELECT p FROM Person p WHERE AND p.age > ?"

In case of (a), the user can number the parameters in a different order than they appear in
the SQL query string. So, one can do the following
   a2) "SELECT p FROM Person p WHERE AND p.age > ?1"

While in case of (b), the parameter order is implicit and is same as their order of appearance
in SQL String.

Recently, we have been modifying in this region of code -- and if you provide further details
(the SQL query, the parameter naming, the values of the parameter you want to set), we can
consider implementing it.   

> SQLStoreQuery  does not support named parameters
> ------------------------------------------------
>                 Key: OPENJPA-893
>                 URL:
>             Project: OpenJPA
>          Issue Type: Question
>          Components: kernel
>    Affects Versions: 1.1.0
>         Environment: Weblogic 10.3, Oracle 9.2
>            Reporter: Nuno Furtado
> I was wondering what was the reason behind this specific StoreQuery not allowing named
parameters, and wether there was a way to get around this situation. 
> The original problem was that the TO_DATE Oracle function was not supported by JPQL parser,
so i was forced into a native query, and at this point i'm forced to redo the whole query
in a somewhat troublesome way, if any of you can provide me with an easy solution i would
appreciate it.
> Thank you in advance

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message