I'm new in grails and I'm not really familiar in hibernate. I've come up to a problem regarding hibernate query using executeQuery in grails. I just made this code similar to the original code that's having a problem:
def nonMemberList = Group.executeQuery("select gp.name from Group gp where gp.status = 'CONFIRMED_MEMBER'")
def FemaleMemberList = Group.executeQuery(""" select sum(case when g.isMale = false and g.name not in(:isNotConfirmedMember) from Group g where :startDate <= g.dateCreated and g.dateCreated < :endDate""",
[isNotConfirmedMember: nonMemberList, startDate: startDate, endDate: endDate])
Error occurs whenever the nonMemberList is null and I've found out that the list should not be null when I use the is not syntax.
I'm not really familiar in hibernate queries, that's why I'm having a problem what other hibernate query should I use that also behaves like the original code. thanks for sharing your knowledge.