0 Replies Latest reply on Dec 17, 2003 2:34 PM by Mikkel Heisterberg

    Pointers on modelling attributes of many-to-many relation in

    Mikkel Heisterberg Newbie

      Hi there.

      I am looking for pointers on how I might model an attribute of a many-to-many relationship in CMP (it is not creating the actual relationship using CMR that is the problem).

      An example scenario is as follows:
      Relation 1: Context (prim-key: context_id)
      Relation 2: User (prim-key: user_id)

      A User may be a member of more than one Context and Contexts may have many Users. Apart from this a given user in a given context may have "full access" which then is an attribute of the relation:
      Many-to-many mapping relation: Context_User, attributes:

      Hence the full_access attribute doesn't belong to the Context relation or to the User relation, and therefore it shouldn't be modelled as part of the User entity EJB or the Context entity EJB. But where then ?

      Will I need to define an extra entity EJB to model that entity, or is there another smart way to do this ?

      Any pointers would be appreciated.