borinquenkid commented on code in PR #15550:
URL: https://github.com/apache/grails-core/pull/15550#discussion_r3032928004
##########
grails-datamapping-core/src/main/groovy/grails/gorm/DetachedCriteria.groovy:
##########
@@ -135,7 +135,7 @@ class DetachedCriteria<T> extends
AbstractDetachedCriteria<T> implements GormOpe
*/
List<T> list(Map args = Collections.emptyMap(),
@DelegatesTo(DetachedCriteria) Closure additionalCriteria = null) {
(List)withPopulatedQuery(args, additionalCriteria) { Query query ->
- if (args != null && !args.isEmpty()) {
+ if (args?.max) {
DynamicFinder.populateArgumentsForCriteria(targetClass, query,
args)
return new PagedResultList(query)
}
Review Comment:
This actually discovered a few bugs
--
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]