Luiz,

You could certainly remove the FK constraint, load user data, then re-create
it.

But will you *always* have an address to associate with a user before you
save that user? If not you might reconsider forcing the user table to have a
FK constraint to address.

Jason



On 12/18/06, Luiz Fernando Rodrigues <[EMAIL PROTECTED]> wrote:

Hello,

   I have a bidirectional (User-Address) association in my model. When
I run db-unit it fails because it tries to insert user rows with
association to address, but there is no address created, so I receive
a FK violation.
   Can I turn off FK constrains before inserting the rows and the turn
then on again? (I'm using postgres, but it should not matter, should
it?)

thanks,
Luiz

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


Reply via email to