• 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: EOF - rows inserted in to database in random order on ec.savechanges()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF - rows inserted in to database in random order on ec.savechanges()


  • Subject: Re: EOF - rows inserted in to database in random order on ec.savechanges()
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 24 Oct 2008 21:28:11 -0700


On Oct 24, 2008, at 9:10 PM, J Stephanos wrote:

When we do batch inserts, the rows are inserted in random order
instead of the order in which it is inserted in to the ec.
How can we control to database insertion order?

- create eo
- insert in to ec

- after doing  about  20 inserts, we do ec.saveChanges()

All rows are there in the database  but the insertion order is random.
Can this be controlled? How?
Works fine when you save changes after every  ec insert But that is
inefficient..


The order is undefined. Are you having problems with constraint violation? Your best option is to make the constraints DEFERRABLE INITIALLY DEFERRED if your database supports it. If not, Wonder's ERXEntityDependencyOrderingDelegate is your next best choice.


Chuck


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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: 
 >EOF - rows inserted in to database in random order on ec.savechanges() (From: "J Stephanos" <email@hidden>)

  • Prev by Date: EOF - rows inserted in to database in random order on ec.savechanges()
  • Next by Date: AjaxSubmitButton as JS did not call his action
  • Previous by thread: EOF - rows inserted in to database in random order on ec.savechanges()
  • Next by thread: AjaxSubmitButton as JS did not call his action
  • Index(es):
    • Date
    • Thread