mirror of https://github.com/apache/openjpa.git
Allow the parameter to an IN(?) expression to be a Collection type, which allows variable-length IN parameters. The spec is a little vague about whether this should be allowed or not, but there's no reason not to support it.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@485967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6dff15b02f
commit
0ffb985316
|
@ -822,8 +822,9 @@ public class JPQLExpressionBuilder
|
|||
while (inIterator.hasNext()) {
|
||||
val2 = getValue((JPQLNode) inIterator.next());
|
||||
|
||||
// special case for <value> IN (<subquery>)
|
||||
if (val2 instanceof Subquery && node.getChildCount() == 2)
|
||||
// special case for <value> IN (<subquery>) or
|
||||
// <value> IN (<single value>)
|
||||
if (!(val2 instanceof Literal) && node.getChildCount() == 2)
|
||||
return factory.contains(val2, val1);
|
||||
|
||||
// this is currently a sequence of OR expressions, since we
|
||||
|
|
Loading…
Reference in New Issue