1 Reply Latest reply on Jan 7, 2003 11:01 PM by Juha Lindfors

    Insert foreign key into existing table / alter table?

    Bernhard Hurzeler Novice

      Hello there,

      Have two jar files (modules) with ejbs and relationships using the same table in the DB Postgres 7.2. When the first jar gets deployed on JBoss 3.0.3 a table gets created with the appropriate foreign keys for the relationship.

      However if I then deploy the second jar the required foreign keys for the relations in the second jar do not get inserted in the table. The table remains unchanged.

      Note: If I deploy the second jar first the appropriate foreign keys get created but if I then deploy the first jar the foreign keys for the first do not get created.

      In other words the jars work just fine by themselfs.

      Question: How do I get jboss to insert foreign keys (column) into an existing table. Why is my table not altered?

      Please help.

      Thank you.

      Bernie.