"Method failed to delete row in database" for flattend relationship after adding delete cascade
"Method failed to delete row in database" for flattend relationship after adding delete cascade
- Subject: "Method failed to delete row in database" for flattend relationship after adding delete cascade
- From: Kaj Hejer <email@hidden>
- Date: Tue, 22 Mar 2005 11:14:56 +0100
Hi!
After adding delete cascade to some of our constraints I get "method
failed to delete row in database" when deleting an objects which is
part of a flattend relationship.
After debugging this issue is seems that EOF wants to delete a row in
the linkingtable when I delete one of the objects in this flatten
relationship even when I have set "no action" on both the relationship
to the linkingtable and the flatten relationship (but this row was
deleted just a little while ago by our contraint with delete cascade).
The delete cascade has been added to both the forreign key constraints
in the linkingtable.
If I make the flatten relationship invisible (remove the "diamond") I
dont get this error.
If I invalidate the object I try to delete before deleting it I don't
get this error.
Why should EOF want to delete a row in a linkingtable when deleting an
object when the deleteRule in EOF for both the relationship to the
linkingtable and the flattend relationship is set to "no action"? Bug
in WO/EOF?
(Yeah... I know... I could just remove delete cascade from the
constraints, but we do want them there because that makes other stuff
(non WO) easier.)
I'm on WO5.2.3 on osx and oracle 9.2
The stacktrace I get is:
com.webobjects.eoaccess.EOGeneralAdaptorException:
deleteRowDescribedByQualifierEntity --
com.webobjects.jdbcadaptor.JDBCChannel: method failed to delete row in
database
at
com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContextI
nformationAdded(EODatabaseContext.java:4676)
at
com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseConte
xt.java:6384)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingCo
ntext(EOObjectStoreCoordinator.java:415)
at
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.j
ava:3165)
at Application.cleanAfterUnitTest(Application.java:316)
at NettskjemaTestCase.tearDown(NettskjemaTestCase.java:106)
at com.codefab.wounittest.WOUTTestCase.runBare(Unknown Source)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:421)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:305)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:186)
TIA!
-Kaj :)
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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