0 Replies Latest reply on Jun 9, 2004 4:51 AM by davout

    CMP relationships and deleting links

    davout Newbie

      I have a question about how to manage the deletion of a link entry between two entity beans without deleting the 2nd entity.

      For example I have two entity beans - the first called 'Requirement' the second called 'UseCase'. A third entity bean called 'RequirementUseCaseLink' acts as a link between the previous two entities

      I have a CMP relationship field defined for 'Requirement' that exposes the list of related use cases.

      Like...

      public class Requirement {
      public int getID();
      public String getTitle();
      public Collection getUseCases();
      }

      public class UseCase {
      public int getID();
      public String getTitle();
      }

      public class RequirementUseCaseLink {
      public int getRequirementID();
      public int getUseCaseID();
      }

      Question is how do I delete a requirement/use case link without deleting the use case entity?