Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.2
-
None
-
None
Description
EntityProperty has a few polymorphic methods to bind "in" and "nin" ID arrays. E.g. for "in":
Expression inId(Collection<Object> ids) Expression inId(Object firstId, Object... moreIds)
This API has a few issues - parameter ambiguity (e.g. code trying to bind IDs as a "Set<String>" would hit the second (vararg) method instead of the desired first method), and inability to bind an Object[].
We need to redesign this API to address the two problems above (with deprecation where possible)... Maybe smth like this:
Expression idsIn(Object... ids) Expression idsInCollection(Collection<?> ids)
Other candidates for similar redesign:
EntityProperty.ninId(..) CollectionProperty.contains(..) CollectionProperty.containsId(..) CollectionProperty.notContains(..) CollectionProperty.notContainsId(..) MapProperty.contains(..) MapProperty.containsId(..) MapProperty.notContains(..) MapProperty.notContainsId(..) SelectById.query(..) SelectById.dataRowQuery(..)