2 Replies Latest reply on May 23, 2002 11:39 AM by Pete Luellen

    unidirectional, many to many relationship

    Pete Luellen Newbie

      I'm trying to implement a unidirectional, many to many relationship and am running into problems.

      I have two EJBs: User and Role. A User has many Roles and a Role has many Users. A User knows about its Roles but a Role does not know about its Users.

      So, the User EJB has getter and setter methods for roles:

      Collection getRoles()
      and
      setRoles(Collection roles)
      However, the Role EJB has no corresponding getter and setter methods for its Users.

      My question is this: What do I use for my <field-name> values for both sides of this relationship in my jbosscmp-jdbc.xml file? That is, there is no field for the Role EJB.

      I can't seem to find an example anywhere.

      Oh yeah, I'm using 3.0.0-RC3

      Thanks for the help.