• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to duplicate an EOEnterpriseObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to duplicate an EOEnterpriseObject


  • Subject: Re: How to duplicate an EOEnterpriseObject
  • From: Georg von Bülow <email@hidden>
  • Date: Mon, 07 Aug 2006 14:53:06 -0300

Have a look in the bible :-) : "Practical WebObjects" by Chuck Hill and Sascha Mallais, chapter 9 "Copying EnterpriseObjects". There you will find an implementation which does excately what you want - a "deep copy" including the referenced objects - and works fine.
This should give you a starting point how to copy objects. Of course, if the default implementation offered there is not enough for you, you could extend like Ken suggested and put additional meta-data in the userInfos of the EOmodel to determine when to copy.


HTH,
Georg

------------------------
Georg von Bülow
Niterói - Rio de Janeiro
Brasil

Ken Anderson escreveu:
I've done stuff like this before - it really requires you to store additional meta-data in the model (like what relationships to copy or deep copy) and having your objects inherit from a common superclass. Then, in your deep copy method of the common superclass, inspect the model and copy what you have to.

On Aug 7, 2006, at 11:48 AM, email@hidden wrote:

Is there an easy way to duplicate an EOEnterpriseObject which would envolve
automatically inserting new rows in variours database tables that are referenced?


I want to avoid building a copy of an object manually by creating sub-objects and their sub-objets and in the end putting them together...as I want to "copy" an object with many database references....

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:


This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How to duplicate an EOEnterpriseObject (From: email@hidden)
 >Re: How to duplicate an EOEnterpriseObject (From: Ken Anderson <email@hidden>)

  • Prev by Date: Re: How to duplicate an EOEnterpriseObject
  • Next by Date: Any WebObjects updates in Xcode 3.0 ?
  • Previous by thread: Re: How to duplicate an EOEnterpriseObject
  • Next by thread: Any WebObjects updates in Xcode 3.0 ?
  • Index(es):
    • Date
    • Thread