Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 Grails 中限定方法参数与域属性,其中查询条件名称相同?
例如:
def getPeople(age, sex) { People.find { age == age && sex == sex } }
像这样的东西!?
def getPeople(age, sex) { People.find { delegate.age == age && delegate.sex == sex } }