0 Replies Latest reply on Mar 16, 2005 11:13 AM by semama1

    Auto increment and relation table mapping

    semama1

      Hi,

      I have drouble with autoincrement and a 'relation table'. My bean A has autoincrement id and in ejbPostCreate I set a relation to a bean B. The relation is defined as a table (ABRel with columns aId and bId) in database.

      When checking the contents of the table after the create all the aIds are 0. This means that even though the A is set to autoincrement (using 0 during insert) the relation is not created with with the autoincremented id. I have also set the insert-after-ejb-post-create to true. Is this the problem?

      How should i do this? I would like to have insert-after-ejb-post-create set to true, because I set some other relations in postCreate as well.

      /M