• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: order of INSERTs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: order of INSERTs


  • Subject: Re: order of INSERTs
  • From: Ramsey Gurley <email@hidden>
  • Date: Mon, 02 Mar 2015 09:45:54 -0700

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 <email@hidden> 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      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
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


References: 
 >order of INSERTs (From: OC <email@hidden>)

  • Prev by Date: Re: global EO representant / locking on EO?
  • Next by Date: Re: WOInstaller.jar crashes
  • Previous by thread: order of INSERTs
  • Next by thread: Re: No template found for component Main
  • Index(es):
    • Date
    • Thread