Try looking up the related Entity in the calling code and passing the Entity reference to the Create/PostCreate rather than doing a lookup inside the Create/PostCreate. This is what I had to resort too.
I believe looking up the Entity in the PostCreate starts a new database transaction, there by flushing the Create SQL transaction. The INSERT then fails as a result of the NULL Foreign Key that has not yet been identified.
-------- Original Message --------
Subject: A.L. CMR Question
From: Mark Aufdencamp <[EMAIL PROTECTED]>
Date: Wed, November 07, 2007 10:34 am
To: [email protected]
Hi A.L.,If you can give us some more info, we'll be more than willing to help. I presume you have an Entity Bean that your trying to set a CMR with to another Entity Bean and the underlying tables have NOT NULL constraints on the relationship fields? Can you post the Entity Bean Code, Table Structure, and Deployment plan.Sorry for the new post, but the apache list server dinged me with a to high spam score?Mark Aufdencamp
