Once again, thank you for your ideas. Going to increase my caffeine intake
now.

Amiel

On Tue, Jan 26, 2010 at 4:24 AM, Chuck Hill <ch...@global-village.net>wrote:

>
> On Jan 25, 2010, at 12:32 AM, Amiel Montecillo wrote:
>
>  Hi List,
>>
>> I am having a dilemma on how to best implement this kind of scenario.
>>
>> I need the update process of an EO by creating an new EO with the updated
>> values and archiving the old one. This EO has quiet a few to-many
>> relationships that needs to be archived as well.
>>
>> I am thinking of copying the existing values along with the relationship
>> values to an NSDictionary and tie that to the form. Once the save action
>> fires, inspect if there are any changed values and create a new EO with the
>> updated values and archive the old one.
>>
>> Can anyone suggest a better way of handling this?
>>
>
> Use the EOCopying code from Practical WebObjects.  If you want to edit eo,
> instead edit eo.copy().  The copy() method should mark the existing object
> as archived.  If the user saves, the existing object will be saved marked as
> archived, and new objects will be created.  You will need to handle how
> these objects are referenced in relationships so you don't show archived
> versions.
>
> The GVCGenericObjects framework shows one way of doing this, though it is
> NOT intended for use as an audit trail.
> http://www.global-village.net/chill/gvc_frameworks
>
>
> There have been several good discussions on various audit trail
> implementations on the list.  Search for "audit trail".  You need to
> carefully evaluate your requirements and choose your implementation
> accordingly.
>
>
> Chuck
>
> --
> 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
>
>
>
>
>
>
>
>


-- 
socket error: unable to connect to 127.0.0.1
 _______________________________________________
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