I have an object graph that's being saved and it seems okay. I have an
OrderHeader object and an OrderDetailCost object where the foreign key for
OrderDetailCost requires OrderHeader to exist.
Here's the sql (snipped):
May 15 10:05:00 DataBuilder[2500] DEBUG NSLog - === Begin Internal
Transaction
May 15 10:05:00 DataBuilder[2500] DEBUG NSLog - evaluateExpression:
<com.webobjects.jdbcadaptor.SybasePlugIn$SybaseExpression: "INSERT INTO
production..order_header(personalization_amount, ...snip....
May 15 10:05:00 DataBuilder[2500] DEBUG NSLog - evaluateExpression:
<com.webobjects.jdbcadaptor.SybasePlugIn$SybaseExpression: "INSERT INTO
production..order_detail_costs(duty_tax_cost, ...snip....
The primary key values in both tables are correct (the sql that I snipped
shows that)...but I get a constraint error saying that order_detail_costs
expects to have order_header inserted first. I'm stumped, because that's
exactly what it's doing.
May 15 10:05:00 DataBuilder[2500] INFO er.transaction.adaptor.Exceptions -
Database Exception occured:
com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression
failed: <com.webobjects.jdbcadaptor.SybasePlugIn$SybaseExpression: "INSERT
INTO production..order_detail_costs(duty_tax_cost ...snip...:
Next exception:SQL State:23000 -- error code: 546 -- msg: Foreign key
constraint violation occurred, dbname = 'production', table name =
'production..order_detail_costs', constraint name = 'order_detlcost_ordhdr'.
Any ideas?
Thanks,
Lon
Using:
Sybase 12.5.4 (with the latest jConnect...their jdbc driver)
WebObjects 5.4.3 with Wonder from a couple of weeks ago
_______________________________________________
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]