Blind chance. Use deferred constraints. If your DB doesn’t have deferred 
constraints, you might have some success by adding the following to your 
properties file

com.webobjects.eoaccess.ERXEntityDependencyOrderingDelegate.active=true

But that is only if your database is lame and you can’t use deferred 
constraints. It sounds like you can. Use deferred constraints.

On Mar 2, 2015, at 6:42 AM, OC <o...@ocs.cz> wrote:

> 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      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
> 
> This email sent to rgur...@smarthealth.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to