order of INSERTs
order of INSERTs
- Subject: order of INSERTs
- From: OC <email@hidden>
- Date: Mon, 02 Mar 2015 14:42:32 +0100
Hello there,
the order of INSERT adaptor ops, it is essentially random or is there some logic behind?
Months ago, on a server the admin added a DB foreign key restraint (immediate not deferrable, alas); since it worked all right, they did not bother to tell me. I do not re-order adaptor ops in the delegate method (but I do log them), and today I've found that for the first time in months, the code instead of
INSERT T_AUCTION
INSERT T_AUDIT
as always so far now did generate those two in the opposite order -- which of course crashed, for there's the FK restraint in T_AUDIT.
The solutions are more or less self-evident (change the restraint to deferred, or re-order the ops; have I forgot anything?), but I do wonder: might the sudden change be a result of something I did in my code? Or was it a pure blind chance that it did work so far without a glitch?
Thanks and all the best,
OC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden