Richard Zowalla created OPENJPA-3046:
----------------------------------------
Summary: Criteria parameter used only in a join ON condition is
not registered
Key: OPENJPA-3046
URL: https://issues.apache.org/jira/browse/OPENJPA-3046
Project: OpenJPA
Issue Type: Sub-task
Reporter: Richard Zowalla
A criteria parameter that is used only in the ON condition of a join, for
example
{code:java}
Join<A, B> j = root.join("b");
j.on(cb.equal(j.get("name"), cb.parameter(String.class, "n")));
{code}
is not collected by {{CriteriaQueryImpl.collectParameters}}, so
{{setParameter("n", ...)}} fails with "Parameter named n is not declared".
Roots are not visited and a join does not visit its ON predicate. OPENJPA-3040
fixed the same for the select list, group by and order by.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)