2 Replies Latest reply on Dec 5, 2001 4:42 PM by Frank Langelage

    "foreign key" contraints, order of table generation

    Frank Langelage Master

      I am using the current CVS-version of jboss 3.0.
      Since a few days, a foreign key constraint can be generated when deploying entity-beans with cmp2.0.
      I have AddressEJB which has a many2one-uni-Relationship to CountryEJB and I have ItemEJB which has many2one-uni-Relationships to ItemGroupEJB and UnitOfMeasureEJB.
      The foreign key constraint for Table Address is generated. The constraints for Item-ItemGroup and Item-UnitOfMeasure are not generated.
      I think it has to do with the order in which the Beans are deployed. All Beans are in one jar.
      The order is Item, UnitOfMeasure, Country, ItemGroup, Address.
      So when Item is created, the related Tables are not there, so no foreign key can be created.
      When creating Table Address, the related table country does exist and the foreign key can be created.

      If this is the reason, how can I influence the order of deploying the beans inside the jar ?