Questions about implementing Domain class relationships & constraints in Grails
问题 Using ArgoUML, I very quickly created this trivial representation of a few Domain classes (Person, Store, Product) and their relationships. I'm struggling with the implementation of the relationships. Below was my initial approach for the Person domain, but it seems that I am missing something important. class PersonToPerson { Person from Person to String relation static constraints = { relation(inList:["Friend to", "Enemy of", "Likes", "Hates"]) } static belongsTo = [ Person ] } class Person