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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to