def c = Employee.createCriteria()
return c.list {
} as Set;
上記のコードは、テーブルのすべてのオブジェクトを返しています。
しかし、次のようにフィルタリングしようとすると、null 値が取得されます。
def c = Employee.createCriteria()
return c.list {
'eq'('id', 604931)
} as Set;
(また)
def c = Employee.createCriteria()
return c.list {
'between'('updatededOn', startDate, endDate)
} as Set;
私がまさに望んでいるのは、updated_on が startDate と endDate の間にある Employee テーブルからすべての行を取得することです。startDate と endDate は Date オブジェクトです。
ありがとう