10 Replies Latest reply on Jun 16, 2004 3:25 AM by Alexey Loubyansky

    Is this a jboss bug (entity setter mehod)?

    vying Newbie

      I am wondering how the behavior of a setter method would be for one side of the 1-to-many relations . Base on EJB spec 2.x ,if we use the setter method to set a new relationship,then the old relations are "clear" before the new relationships are established. which means the old referential integrity are removed from the respective tables in Database .
      But I find a strange behavior with a compoud pk with jboss.Here
      is an example:
      Two entitybeans,say A and B , where their underlying tables are Table A and B in the Database.For A the primary key is Pk_1, B's primary key is compound (Pk_1,B1),where B1 is another column in table B. we have a setter method in entitybean A for the relationship of bean B,say setBs(Collection collectionOfBs),based on EJB spec, jboss container is supposed to perform "clean" job, which dissassociate those old rows in table B with Table A before setting those new relationships in table B .But jboss seems to add new relationship without disassociate the old ones.Any ideas