Hi, In one of my table, there are few foreign keys (of type NUMBER) which can be NULL. I have a CMP for that table and no value is set for the attributes corresponding to the foreign keys in its create method. During the invocation of create, it is throwing Constraint Violation on this Foreign Key. On decompiling the container generated code for this CMP, I found these values being set to 0. Is there any solution for this problem. TIA -deepak (I am using WLS 8.1, EJBGen, Oracle 8, EJB 2.0)
Hi Lasse, that isn't the answer I am looking for. I have foreign keys which can be NULL but the portion you pointed is talking about delaying database insert because of NON-NULL foreign keys. regards -deepak
Hmm. You could try changing the Java variable from int to Integer if you haven't already. Another thing you could do would be to use a Collection (i.e. one-to-many relationship). If you do figure out the solution, please share it with the rest of us.