Author: steve.ebersole(a)jboss.com
Date: 2009-08-11 11:37:23 -0400 (Tue, 11 Aug 2009)
New Revision: 17262
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java
Log:
EJB-447 : Implement JPA 2.0 criteria apis
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java 2009-08-11
01:01:18 UTC (rev 17261)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java 2009-08-11
15:37:23 UTC (rev 17262)
@@ -66,6 +66,7 @@
for ( ParameterExpression param : queryStructure.getParameters() ) {
registry.registerParameter( param );
}
+ // TODO : correlations. Can they contain parameters?
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java 2009-08-11
01:01:18 UTC (rev 17261)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java 2009-08-11
15:37:23 UTC (rev 17262)
@@ -21,7 +21,6 @@
*/
package org.hibernate.ejb.criteria;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.Set;
import java.util.HashSet;
@@ -83,6 +82,12 @@
ParameterContainer.Helper.possibleParameter(subquery, registry);
}
+ // both group-by and having expressions can (though unlikely) contain parameters...
+ ParameterContainer.Helper.possibleParameter(having, registry);
+ for ( Expression<?> grouping : groupings ) {
+ ParameterContainer.Helper.possibleParameter(grouping, registry);
+ }
+
return parameters;
}
Show replies by date