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.
我有一个嵌入孩子的对象:
class Parent { Child child static embedded ['child'] } class Child { String name }
而且我想使用 executeQuery (因为在我的真实情况下,我不能使用 Where 查询或创建条件)。在不切换到标准的情况下如何做到这一点?
尝试:
Parent.executeQuery("FROM Parent parent WHERE parent.child.name = 'FOO'")
编辑:
刚刚注意到,您需要为嵌入对象添加一个静态声明:
static embedded ['child']
也许这会奏效......