0 Replies Latest reply on Jan 23, 2004 4:54 AM by rusudanj

    Referential integrity check fails

    rusudanj Newbie


      I have encountered following problem with referential constraints in Jboss:

      I have a CMR field in my table (table A) with constraint referring to the primary key of another table (table B). When I delete a row from table B (which is referred from table A), with EJBObject.remove(), I don't get a "referential integrity violated" exception, because JBossCMP sets the corresponding CMR field in the table A to null before deleteng the row in table B and this way when the row in table B is deleted there is no violation. When I do the same through the direct JDBC "delete * from table ..." it works fine.

      does anyone know the solution to this problem?

      Thanks in advance,