grails - How to pass variable holding a value to groovy eq query? -


how can pass variable holding value instead of passing value directly groovy search criteria?

for (def payee in payees) {     def results = resp.cases.find("eq 'hrid','7547') // hard code values work     def results = resp.cases.find("eq 'hrid',??????) // how can pass payee } 

i'm new this. please help.

basing on examples, check it:

def results = resp.cases.find { case -> case.hrid == payee } 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -