[ 
https://issues.apache.org/jira/browse/OPENJPA-2980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Solodovnik resolved OPENJPA-2980.
---------------------------------------
      Assignee: Richard Zowalla
    Resolution: Fixed

> addNamedQuery relabels criteria query as JPQL
> ---------------------------------------------
>
>                 Key: OPENJPA-2980
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2980
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 4.2.0
>            Reporter: Maxim Solodovnik
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> Discussion thread: 
> https://github.com/apache/openjpa/pull/144#discussion_r3683005009
> **(medium)** `addNamedQuery` re-labels a criteria query as JPQL using 
> `queryImpl.getQueryString()`, which for criteria queries is the CQL/toString 
> rendering - OpenJPA has never guaranteed that string is parseable JPQL 
> (parameter rendering, literals, treated paths). Has this been exercised 
> beyond simple queries? The three `catch (Exception) { // ignore }` blocks 
> below (lines 512-540) would also hide genuine failures - they could be 
> narrowed to IllegalStateException where the spec defines it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to