我正在尝试运行此查询,这将给我计数 但它似乎确实有效
def query = "select count(A.id) from Artifact A "+
"LEFT JOIN A.classification C on (A.id=C.artifactId) "+
"where C.id IS NULL";
def tc = Artifact.executeQuery(query);
答案 0 :(得分:7)
这可能有所帮助:
def query = "select count(A.id) from Artifact A "+
"LEFT JOIN A.classification C "+
"where C.id IS NULL";
def tc = Artifact.executeQuery(query);
你不需要在这里,因为神器应该已经连接了#34;通过映射进行分类。