Many to Many Relation

From: Dhruti Ramani (dhrutiraman..ahoo.com)
Date: Wed Jun 29 2005 - 12:02:35 EDT

  • Next message: Mike Kienenberger: "Re: Many to Many Relation"

    Hello,
     
    In my object model I have two objects UserRole and SystemUser. I need to have Many to Many relation between them. UserRole can have any no. of systemUsers and SystemUser can have many roles. I have added a foreign key(userRole1_id) in UserRole and systemUser_id is the primary key for SystemUser. Here is what I have tried.....
     
    Relation From To Join
    users UserRole SystemUser (userRole1_id --- systemUser_id) ("to_dep_key checked)
    roles SystemUser UserRole (systemUser_id----userRole1_id)
     
    But when I create those two objects and try to add user to userRole or userRole to user, it does not persist in the database. Individually both objects are there in the database but there is no relation between them and I don't get any errors.
     
    Am I doing something wrong here? Is there any other way to have many to many relation between two objects?
     
    Thanks in advance,
    Denna

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com



    This archive was generated by hypermail 2.0.0 : Wed Jun 29 2005 - 12:02:37 EDT