1 Reply Latest reply on Apr 1, 2004 6:26 AM by hofmeister

    Table not created with all pk-constraints with compund prima

    hofmeister Newbie

      Hi,

      I encounter some strange behaviour:
      I have two tables A and B. A has PK pkA and B has a compbound PK(pkA, pkB). B.pkA references A.pkA. The relationship and everything works fine, but when I deploy the beans and the tables are not existing the created table for B has only the pkA as a PK-field in the DB. pkB misses the constraint. My XDoclet for the method getPkB is:

      @ejb.interface-method view-type = "local"
       @ejb.persistence column-name = "pkB"
       @ejb.pk-field
       @ejb.persistent-field // I just played with that. I know it's deprecated
      

      As a Class level-Tag I have also played with
      @jboss.persistence pk-constraint = "true"
      But it did'nt work.
      Then I created the tables by hand and reverse engineered them with middlegen. After that I deleted the tables, deployed the generated beans but the created table for b did not have that pk-constraint.
      What should I do? Is it my fault, or is ist a bug in JBoss?
      I'm using JBoss 3.2.3 and Oracle 8.1.7 with the thin driver. But I think the DB is not guilty..

      Regards,

      Helge