We tried different things but in the end we used a trigger.  If the archive is 
for auditing  I think a database trigger is best.  No need to clutter up you 
application with code to make an audit trail.

Message: 9
Date: Mon, 25 Jan 2010 16:32:23 +0800
From: Amiel Montecillo <bosyot...@gmail.com<mailto:bosyot...@gmail.com>>
Subject: Updating EO by inserting new EO and archiving the old EO -
       any     suggestions?
To: WebObjects-Dev Mailing List List 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Message-ID:
       
<68e14f631001250032r6900c6b8g70cda0e9b1155...@mail.gmail.com<mailto:68e14f631001250032r6900c6b8g70cda0e9b1155...@mail.gmail.com>>
Content-Type: text/plain; charset="iso-8859-1"

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?

Thanks,
Amiel


Jeffrey Simpson
Senior Software Engineer
IT
Youth For Understanding USA
Telephone: 240.235.2144
Toll Free: 1.800.424.3691
Fax: 240.235.2174
Website: www.yfu-usa.org<http://www.yfu-usa.org>


[http://yfuusa.org/media/Disclaimer/image001.jpg]<http://www.yfu-usa.org>       
   [http://yfuusa.org/media/Disclaimer/image002.jpg] 
<http://yfuusa.org/host-families/student-profiles.php>
Youth For Understanding (YFU) prepares young people for their responsibilities 
and opportunities in a changing, interdependent world.


Join YFU USA on Facebook, Twitter and YouTube
[http://yfuusa.org/media/Disclaimer/facebook_32.png]<http://www.facebook.com/YFU.USA.Fan>
 [http://yfuusa.org/media/Disclaimer/twitter_32.png] 
<http://twitter.com/YFU_USA>  
[http://yfuusa.org/media/Disclaimer/youtube_32.png] 
<http://www.youtube.com/YFUUSA07>

 _______________________________________________
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