Cascade delete with optional to-one relationship
Cascade delete with optional to-one relationship
- Subject: Cascade delete with optional to-one relationship
- From: "Albert Jagnow" <email@hidden>
- Date: Mon, 20 Oct 2003 17:08:26 -0500
- Priority: normal
- Thread-topic: Cascade delete with optional to-one relationship
It is possible to use cascade delete on an optional to-one relationship.
For example I have table A and table B where table A has an optional
to-one relationship to table B. Most of the time table A will have no
table B object, but if table A does have a relationship to table B and
the table A object is deleted I want the table B object deleted as well.
I assume I would set the relationship to optional and the delete rule to
cascade in EOModeler to accomplish this. However if I do this and I try
to delete a table A object with no table B relationship I get the
following error:
recordDeleteForObject: com.webobjects.eoaccess.EODatabaseContext
com.webobjects.eoaccess.EODatabaseContext@242445 failed to find a
snapshot for EO with Global ID:_EOIntegralKeyGlobalID[TableB
(java.math.BigDecimal)2.000000000000000000000000000000] that has been
deleted from
com.webobjects.eocontrol.EOEditingContextcom.webobjects.eocontrol.EOEdit
ingContext@5ae101. Cannot delete an object that has not been fetched
from the database
It looks like WO is trying to delete the table B object even though it
does not exist. Am I doing this wrong or is this some kind of bug?
--Albert
This e-mail (including any attachments) is covered by the Electronic
Communications Privacy Act, 18 USC. 2510-2521. It is confidential and
may be legally privileged. If you are not the intended recipient, you
are hereby notified that any retention, dissemination, distribution, or
copying of this communication is strictly prohibited. Please reply to
the sender that you have received the message in error, and then delete
it. Thank you.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.