5 Replies Latest reply on Apr 10, 2002 5:06 PM by Antonio Kantek

    Many-to-Many relationship with cmp

    Dan Harfleet Newbie

      Hi,

      I have three entities:

      I have three database tables, say for example:

      USER, ROLE and USER_ROLE

      USER and ROLE both have a pk and USER_ROLE uses the pk from USER and ROLE to map the many to many relationship.

      I want to use CMP, but want to make sure I still have the third table (USER_ROLE) created by jaws.

      I will be using a session facade, but would still prefer to manage the relationship with a database table, so that I can view this relationship from other non ejb applications.


      Does anyone know the best approach to designing the 'user_role' Entity bean, should I just have the fk fields in the bean, or a User and a Role entity in there ?

      many thanks
      dan