• 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
MS SQL Server and Deferred Constraints
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MS SQL Server and Deferred Constraints


  • Subject: MS SQL Server and Deferred Constraints
  • From: David Avendasora <email@hidden>
  • Date: Wed, 27 Jun 2007 14:43:31 -0500

Hi all,

I know this issue has been discussed before, or at least eluded to in posts, but I'm having problems with EOF inserting records into related tables before it inserts them into the primary table (I end up with Foreign key constraint SQL errors).

I'm using MS SQL Server (I know, but it is a requirement for the application) and I need to have some way of making sure when EOEditingContext.saveChanges() executes, it saves the records bound for the primary table first. Here's my structure:

Routing<->>RoutingStep<->>RoutingComponent

Records for three are being instantiated in one EOEditingContext, but when I call saveChanges() on it, sometimes (but not always) it errors because it tries to insert RoutingComponent prior to RoutingStep or RoutingStep prior to Routing into the database.
the end of the transaction. What is the most effective way to work around this? I'm sure it has been addressed by people before and if I'm just not finding it (I googled it). If it's out there, just paste a link, if not, can someone share a code sample of how they deal with it?


Thanks!

Dave
_______________________________________________
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


  • Follow-Ups:
    • Re: MS SQL Server and Deferred Constraints
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: [Wonder-disc] ERSelenium without ERExtensions
  • Next by Date: run errors java.lang.reflect.InvocationTargetException
  • Previous by thread: Re: Missing EOModeler component in WOLips?
  • Next by thread: Re: MS SQL Server and Deferred Constraints
  • Index(es):
    • Date
    • Thread