0 Replies Latest reply on Feb 5, 2004 8:44 PM by Wayne L. Andersen

    Best practice relationship management

    Wayne L. Andersen Newbie

      I have a couple of CMP entities that have a parent child relation ship. Lets call them Category and SubCategory.

      SubCategory has a field which needs to be unique relative to it's parent called sortOrder.

      Kitchen may have many related entities like sink, fridge...
      Bathroom may also have several like toilet, bath...

      What is the best way to make sure that I can have both sink and toilet with a sortOrder of 1, but make sure that toilet and bath are not both 1?

      Should I make the check in the session bean, or the entity bean?