rzo1 commented on code in PR #237:
URL: https://github.com/apache/openjpa/pull/237#discussion_r4404247794


##########
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java:
##########
@@ -863,6 +871,19 @@ private void collectParameters(CriteriaExpressionVisitor 
visitor) {
         if (_having != null) {
             _having.acceptVisit(visitor);
         }
+        if (_selection instanceof CriteriaExpression) {
+            ((CriteriaExpression) _selection).acceptVisit(visitor);
+        }
+        if (_groups != null) {
+            for (Expression<?> group : _groups) {
+                ((CriteriaExpression) group).acceptVisit(visitor);

Review Comment:
   Good catch, the group by and order by entries are now checked with 
instanceof as well.



##########
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CompoundSelections.java:
##########
@@ -95,6 +95,20 @@ void assertNoCompoundSelection(Selection<?>...args) {
 
         abstract FillStrategy<X> getFillStrategy();
 
+        /**
+         * Visits this node and then each of its selection terms.
+         */
+        @Override
+        public void acceptVisit(CriteriaExpressionVisitor visitor) {
+            visitor.enter(this);
+            visitor.exit(this);
+            for (Selection<?> arg : _args) {
+                if (arg instanceof CriteriaExpression) {

Review Comment:
   Done.



##########
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaQueryImpl.java:
##########
@@ -863,6 +871,19 @@ private void collectParameters(CriteriaExpressionVisitor 
visitor) {
         if (_having != null) {
             _having.acceptVisit(visitor);
         }
+        if (_selection instanceof CriteriaExpression) {

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to