Re: Constraint error when I don't think I should have one.
Re: Constraint error when I don't think I should have one.
- Subject: Re: Constraint error when I don't think I should have one.
- From: Lon Varscsak <email@hidden>
- Date: Fri, 15 May 2009 12:09:03 -0700
This is a complete shot in the dark, but how does Sybase handle constraints within one transaction? Would the OrderHeader insert have to be committed before you can issue an INSERT into a related table?
As long as it's in the transaction it should be okay. I'm wondering if it's not really in a transaction...but in the end I end up with no rows as I would expect in an error condition.
If that's not it, what is the actual order_detlcost_ordhdr constraint? Is it a compound FK?
It's just based on order_number.
Also, I don't know your business case, but It seems odd that the OrderDetailCost entity would be related directly to the OrderHeader entity and not to the OrderDetail entity.
Technically it's not, it's really directly related to OrderDetailSale (which is inserted before the cost record as well...I just left out that detail), but I didn't setup the foreign keys (that was long before me). However, the foreign key itself has been in place for over a decade, and I have old code (Obj-c) that is fine.
I'm really wondering if this has to do with the way jdbc/jconnect deal with autocommit.
-Lon
_______________________________________________
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