• 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: What's a good way to handle orders?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's a good way to handle orders?


  • Subject: Re: What's a good way to handle orders?
  • From: Miguel Arroz <email@hidden>
  • Date: Mon, 7 Jan 2008 11:27:47 +0000

Hi!

On 2008/01/06, at 23:10, Kevin Windham wrote:

My initial thought for dealing with this was simply to not insert the order and associated lineitems into the db context until after the process is complete. The problem with this is that it violates one of the rules I've read about. That is, that you should insert objects into the context before any manipulation of those objects.

Inserting in a context is not the same as inserting into the DB. The context is a sandbox, you can play all you want on it (well, as long as you don't hit any EOF bug, but that only happens to me and on very weird stuff!). When you are happy with your work, saveChanges() and only then the data will be recorded/updated/deleted on the database.


So the elegant solution is simple: use EOF as it was meant to be used! :) It's already elegant enough! :)

Mind the back button, you don't want to create two order objects if the user starting going back and forward.

  Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >What's a good way to handle orders? (From: Kevin Windham <email@hidden>)

  • Prev by Date: Re: Large Array Clogging
  • Next by Date: Re: What's a good way to handle orders?
  • Previous by thread: Re: What's a good way to handle orders?
  • Next by thread: IllegalArgumentException
  • Index(es):
    • Date
    • Thread