user
05/29/2025, 12:04 PMclass Node {
UUID id
String anotherId
static belongsTo = [Parent: parent]
}
and when I do findByAnotherId(String anotherId)
it fails with org.hibernate.QueryException: could not resolve property: name of: com.example.cs.Node
But when I add another field to the domain with String Name
everything seems to work fine. Why is that so? Is this expected behaviour that all domain classes must have a name?muser
05/29/2025, 12:27 PMuser
05/29/2025, 12:28 PMUUID id
) it but extends another domain called
@GrailsCompileStatic
class SubResource {
UUID id = UUID.randomUUID()
Date dateCreated
Date lastUpdated
static constraints = {
dateCreated nullable: true
lastUpdated nullable: true
}
}
user
05/29/2025, 12:28 PMuser
05/29/2025, 12:30 PMclass Node extends SubResource{
String anotherId
static belongsTo = [Parent: parent]
}
muser
05/29/2025, 12:31 PMuser
05/29/2025, 12:41 PMsort by name
which was causing this issue. Thanks a lot @muser for your attention to this problem