closures - Grails Criteria querying a list with ilike -
i want query list in criteria this:
def patterns = ["abc%", "cde%"] def criteria = myentity.createcriteria(); def results = criteria.list { , { patterns.collect { not { ilike(name, it) } } }
is possible? have query working?
instead of collecting create collection of contents need iterate.
def patterns = ["abc%", "cde%"] def criteria = myentity.createcriteria(); def results = criteria.list { , { patterns.each { not { ilike('name', it) } } }
Comments
Post a Comment