solomax commented on code in PR #215:
URL: https://github.com/apache/openjpa/pull/215#discussion_r4256716942
##########
openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/AbstractExpressionBuilder.java:
##########
@@ -127,6 +127,23 @@ protected ClassMetaData addAccessPath(ClassMetaData meta) {
return meta;
}
+ /**
+ * Register the element and key types of the given field in the query's
access path.
+ * A collection or map field declares Collection/List/Map as its type,
which has no
+ * metadata of its own, so the types such a field reads are its element
and key
+ * types. Registering them keeps the access path complete for a predicate
that uses
+ * the field without declaring a join variable - SIZE(x.coll), x.coll IS
EMPTY - and
+ * mirrors what the Criteria builder records for the same field.
+ */
+ protected void addElementAndKeyAccessPath(FieldMetaData fmd) {
+ if (fmd == null)
Review Comment:
could you please add `{}` :)
--
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]