On Jan 2, 2009, at 4:00 PM, Joe Moreno wrote:

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.

With the right delete rules, you should only need to remove it from the relationship.


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.

I am not sure either.


Chuck


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/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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