I've made this mistake before and I keep forgetting...

I forgot to remove the EO from it's relationship before deleting it. Once I did that, the EOs were deleted as expected.

I'm not sure why EOF would sometimes delete the EO and sometimes it didn't - but, unhooking it before the delete solved the problem is all cases.

Cheers,
Joe

On Dec 31, 2008, at 17:33:12, Joe Moreno wrote:

Happy New Year!

I believe I've seen this issue before, but I don't recall what I'm doing wrong...

I have an EO deleting itself from an editing context, but, sometimes, only the EO's foreign key is getting set to NULL, which has the same effect of deleting the EO. Other times, the row in the database actually gets deleted.

The SQL going to the database sometimes is DELETE and sometimes it's:
UPDATE DEPARTMENT SET OID_EMPOYEE = NULL WHERE OID = ?...

Did I cross EC or something else bad?

Thanks,
Joe

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to