in a DB2 databse

Table A has a PK named id that is also an identity (autoincriment) column

Table B has a PK called id that is also a FK to table A's id field

When attempting to insert Class A, which contains an instance of Class B, it seems that OJB attempts to insert class B before class A. This fails, as class A doesn't have a proper PK yet, and thus class B doesn't have a valid PK yet.

given that I can't change my poorly designed database, is there anything I can do within OJB to get around this problem?

Do I simply need to manually insert class A and B? That would be a shame, as the auto-update feature works great for instances of class A and B that already exist.

any suggestions would be appriciated.






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to