[
https://issues.apache.org/jira/browse/OPENJPA-2980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126143#comment-18126143
]
ASF subversion and git services commented on OPENJPA-2980:
----------------------------------------------------------
Commit 042caefefd40518ca043683f125e51e4d7f12539 in openjpa's branch
refs/heads/tck-mysql from Paulo Cristovão de Araújo Silva Filho
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=042caefef ]
Merge pull request #206 from apache/OPENJPA-2980
[OPENJPA-2980] Replay a criteria query registered by addNamedQuery as a
criteria query
> 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)