Hi,
In my model I have a many-to-many relationship between a Role and a
User entity, which implies I have a roles collection in User and a
users collection in Role.
Now I'm implementing utility adders/removers for those two classes but
I don't know whether I have to keep collections in sync on both sides
of the association or whether it's done automatically somewhere.
In other words, e.g. for Role::addUser(user:User):boolean, what is the
correct implementation :
public boolean addUser(ca.polymtl.larim.schaman.data.User user)
{
return user.getRoles().add(this) & this.getUsers().add(user);
}
Or just...
public boolean addUser(ca.polymtl.larim.schaman.data.User user)
{
return this.getUsers().add(user);
}
Thx in advance.
Best regards.
--
Sebastien ARBOGAST
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user