Re: How to duplicate an EOEnterpriseObject

2006-08-07 Thread Georg von Bülow
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 starti

Re: How to duplicate an EOEnterpriseObject

2006-08-07 Thread Ken Anderson
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

How to duplicate an EOEnterpriseObject

2006-08-07 Thread munich
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...