Re: Removing Object from list but not from database

From: Robert Zeigler (rdzeigl...arizona.edu)
Date: Mon Jun 27 2005 - 17:44:55 EDT

  • Next message: Dhruti Ramani: "Re: Removing Object from list but not from database"

    So... it sounds like...
    UserRoles<-->SystemUser

    Every system user can have multiple roles.
    Every role can be associated with multiple users.
    You have a userrole from which you want to remove user x.
    So, userx will no longer be able to play the role of, for example, admin.
    But, you don't want to delete userx, because userx may still be in the
    role of "genericuser".
    Right?
    Then, what about...
    userRole.removeFromUsersInThisRole(systemUser);
    ? :)

    Robert

    Dhruti Ramani wrote:
    > Hi,
    >
    > In our application we have SystemUser and UserRole objects and the
    > relation between them is many to many. Now UserRole has list of
    > systemUsers(of type SystemUser) called "usersInThisRole". I want to
    > delete particular system user from this list but SystemUser table should
    > keep that user because some other UserRole may have that particular user.
    >
    > How do I do this?
    >
    > Thanks,
    > Denna
    >
    > ------------------------------------------------------------------------
    > Yahoo! Mail Mobile
    > Take Yahoo! Mail with you!
    > <http://us.rd.yahoo.com/evt=31132/*http://mobile.yahoo.com/learn/mail>
    > Check email on your mobile phone.



    This archive was generated by hypermail 2.0.0 : Mon Jun 27 2005 - 17:45:10 EDT