Found shared references to a collection (why?)

View: New views
1 Messages — Rating Filter:   Alert me  

Found shared references to a collection (why?)

by adwin grails :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I got this error message :
error: Found shared references to a collection: Person.relatedPersons



when I tried to save addToRelatedPersons(anotherPerson) :

person.addToRelatedPersons(anotherPerson);
anotherPerson.addToRelatedPersons(person);

anotherPerson.save();
person.save();


my domain :

Person {

 static hasMany = [relatedPersons:Person];

}

any idea why this happens ?


regards

adwin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email