customizing veryDeepCopy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

customizing veryDeepCopy

Peter Uhnak
Hi,

is there a way of customizing what should be copied during veryDeepCopy?

For example I want to clone my (domain) model tree, however the objects have Announcers which I do not want to copy.

Alternative is of course to implement the copying behavior by myself, but I feel like veryDeepCopy should be the appropriate way, no?

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: customizing veryDeepCopy

Denis Kudriashov
Hi.

Look how Morph implements it. Morphs customize it a lot

2017-03-02 16:08 GMT+01:00 Peter Uhnák <[hidden email]>:
Hi,

is there a way of customizing what should be copied during veryDeepCopy?

For example I want to clone my (domain) model tree, however the objects have Announcers which I do not want to copy.

Alternative is of course to implement the copying behavior by myself, but I feel like veryDeepCopy should be the appropriate way, no?

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: customizing veryDeepCopy

Esteban A. Maringolo
I implemented our own copier based on how Morph does it, with our own
copy/deep selectors.
The copier has the option of which classes to copy and which to use
the same (it is, no copy).

There is no other available option that I'm aware of.

Esteban A. Maringolo



2017-03-02 12:25 GMT-03:00 Denis Kudriashov <[hidden email]>:

> Hi.
>
> Look how Morph implements it. Morphs customize it a lot
>
> 2017-03-02 16:08 GMT+01:00 Peter Uhnák <[hidden email]>:
>>
>> Hi,
>>
>> is there a way of customizing what should be copied during veryDeepCopy?
>>
>> For example I want to clone my (domain) model tree, however the objects
>> have Announcers which I do not want to copy.
>>
>> Alternative is of course to implement the copying behavior by myself, but
>> I feel like veryDeepCopy should be the appropriate way, no?
>>
>> Thanks,
>> Peter
>
>

Reply | Threaded
Open this post in threaded view
|

Re: customizing veryDeepCopy

Peter Uhnak
Thanks, I'll look at those.

Peter

On Thu, Mar 02, 2017 at 05:20:25PM -0300, Esteban A. Maringolo wrote:

> I implemented our own copier based on how Morph does it, with our own
> copy/deep selectors.
> The copier has the option of which classes to copy and which to use
> the same (it is, no copy).
>
> There is no other available option that I'm aware of.
>
> Esteban A. Maringolo
>
>
>
> 2017-03-02 12:25 GMT-03:00 Denis Kudriashov <[hidden email]>:
> > Hi.
> >
> > Look how Morph implements it. Morphs customize it a lot
> >
> > 2017-03-02 16:08 GMT+01:00 Peter Uhnák <[hidden email]>:
> >>
> >> Hi,
> >>
> >> is there a way of customizing what should be copied during veryDeepCopy?
> >>
> >> For example I want to clone my (domain) model tree, however the objects
> >> have Announcers which I do not want to copy.
> >>
> >> Alternative is of course to implement the copying behavior by myself, but
> >> I feel like veryDeepCopy should be the appropriate way, no?
> >>
> >> Thanks,
> >> Peter
> >
> >
>