Re: Multiple Row update
Re: Multiple Row update
- Subject: Re: Multiple Row update
- From: Chuck Hill <email@hidden>
- Date: Sun, 02 Mar 2003 10:12:25 -0800
Modifying EOs in an validate... method is an extremely bad idea. EOF does
not take kindly to this. You may not notice it right away, but eventually
EOF will have its revenge. :-)
Chuck
At 09:16 AM 02/03/2003 -0500, George Domurot wrote:
>Dear Oliver: one idea is to add the method validateForDelete() to your
>User object. You can add the necessary code to fetch the appropriate
>User that should absorb the deleting User's Themes. Once you have
>determined which User should be applied to the Themes, you could them
>fetch all Themes related to the User being deleted. Then, enumerate
>through each of the Themes to modify its User. I hope this note helps
>in your task. -George
>
>On Sunday, March 2, 2003, at 05:14 AM, Oliver Leu wrote:
>
>> Dear friends
>>
>> I have a problem with updating multiple rows in a table. For
>> explanation
>> I'll reduce the
>> problem to two tables:
>>
>> The first table: Users, contents user1 and user2
>> Second table: themes, contents many themes, created by the users.
>>
>> Problem: If someone tries to delete user1, I want to take all the
>> themes
>> bound to user1 and wanna give them
>> user2 (for example).
>> In "relational-sense" that means: I have to update all the foreign
>> keys,
>> which points to user1 with the key of user2.
>>
>> How can I realize that in an OO - Way?
>>
>> Thanks for your time
>> Oliver
>> _______________________________________________
>> 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.
>_______________________________________________
>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.
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.