2 Replies Latest reply on Dec 16, 2001 3:00 PM by Luis M. Rosso

    How to model a one-to-many relationship in CMP 1.1 (JBoss 2.

    Luis M. Rosso Newbie

      Hi

      I am trying to model a one-to-many database relationship in CMP 1.1. I cannot use CMP 2.0 (jboss 3), because my ISP supports jboss 2.4.1.

      As far as I have studied EJBs and JBoss, in that scenario, I should have to use "dependent objects", which would hold a list of the PKs of the entity beans related to the one that would contain the "dependent object".

      Is this true? Otherwise, could someone please tell me which is the right approach, and where to find more info about it?

      By the way, in the example shown in the section "Dependent Value Objects [since JBoss 2.4]", in the "Documentation" area of www.jboss.org, it seems that the relationship between the entity bean and the dependent object is one-to-one, and that JAWS simply adds fields to the table associated to the entity bean. I think this would not be possible in a one-to-many relationship, because JAWS would have to add an indefinite number of fields to the associated db table.

      Could someone please tell me what should I do?

      THANKS IN ADVANCE

      Luis