0
我有一個域類反饋如何寫Grails的條件下個createCriteria()
class Feedback{
String name
String email
Date createdOn
Boolean isMailSent
}
I want to fetch all feedbacks with the condition as below
1) isMailSent == false
2) (createdOn - cuurent time) >= 15 minutes
如何寫個createCriteria這些條件()methiod。
我在這裏試圖
def feedbackList = Feedback.createCriteria().list(
) {
eq('isMailSent ', false)
/** here condition (createdOn - cuurent time) >= 15 minutes **/
}