Reputation: 1147
I am trying to run this query which will give me the count but it does seem to work
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);
Upvotes: 1
Views: 5026
Reputation: 8797
This may help:
def query = "select count(A.id) from Artifact A "+
"LEFT JOIN A.classification C "+
"where C.id IS NULL";
def tc = Artifact.executeQuery(query);
You don't need ON here because Artifact should already be "connected" with classification through mappings.
Upvotes: 8