Hi,
how do I get the reverse relation of this many-to-many single class relation?
I have objects which have dependencies on each other. I get the dependencies of one object via the getDependencies() method. But how do I get the dependants of an object?Code:class MyObject { static hasMany = [ dependsOn : MyObject ] static mappedBy = [ dependsOn : 'dependsOn' ] def addDependency(MyObject obj) { this.addToDependsOn(obj) } def getDependencies() { return dependsOn } def getDependants() { return //??? } }
Thank you!
Best regards,
Malte


Reply With Quote