我正在用MongoDB (mongodb插件1.0-M4)测试Grails模型
我有一个类别对象,它可以有父类别。
MongoDB在标准中不支持IsNull,因此我不能再这样做来查找无父类别:
Category.createCriteria().get {
isNull('parent')
}如何在Grails中找到与HasOne的空MongoDB关系?
谢谢!
发布于 2011-04-26 16:06:25
Category.createCriteria().get {
eq('parent', null)
}https://stackoverflow.com/questions/5742301
复制相似问题