0 Replies Latest reply on Oct 22, 2002 3:21 AM by Jürgen Krannich

    Mix CMR and "BMR"

    Jürgen Krannich Newbie

      I'd like to know if it is permitted to mix CMR and what I call BMR (bean managed relationsship). Here is the situation:
      I have 3 Entity-Beans: a RoomBean, a DoorBean and a LockTypeBean. A room might have many doors but a door belongs to exactly one room. This is a one-to-many relationship and can be modeled with CMR. A door might have many lockTypes and a lockTypes might be used for many doors. If a specific lockType is build into a door we need an additional description (e.g. this lockType is used for the topmost lock of this door). This is a many-to-many relationsship that cannot be handeled by CMR because we have an additional attribute (here: description) that depends on the relation (it is stored in the mapping table door_lockType). What I'd like to do is to have all Beans be managed by the container but to manage the many-to-many relationship by myself (getLocks() and getDescriptionForLock(...) are accessing the DB directly). I implemented this and it works fine. My questions are: Is this allowed by the specs? Are there any things I have to consider (caching, transactions, ...).

      Thanks in advance,