OCLOperators deepclone
(Automatically adding template at the end of the page.)
No edit summary
Line 3: Line 3:


For Deepclone, you don't need a destination object. It always creates a new object of the same class as the source.
For Deepclone, you don't need a destination object. It always creates a new object of the same class as the source.
You should however set the DuckType class of the ViewModel (to the same class as the root) in order to discover wrongly named columns that may easily arise over time (as when you rename a property of a class and do not remember that the attribute is part of a deepclone viewmodel that expect to have the column to have the same name as the attribute)


See [[OCLOperators transform|Transform]] for more information and use cases.
See [[OCLOperators transform|Transform]] for more information and use cases.
[[Category:OCLOperators]]
[[Category:OCLOperators]]
{{Edited|July|12|2024}}
{{Edited|July|12|2024}}

Revision as of 17:40, 4 June 2024

object.deepclone(viewmodelname) returns a deepclone copy of the object - viewmodel decide copy depth

Deepclone is a special case of Transform using the same class as both the source and the target.

For Deepclone, you don't need a destination object. It always creates a new object of the same class as the source.

You should however set the DuckType class of the ViewModel (to the same class as the root) in order to discover wrongly named columns that may easily arise over time (as when you rename a property of a class and do not remember that the attribute is part of a deepclone viewmodel that expect to have the column to have the same name as the attribute)

See Transform for more information and use cases.

This page was edited 104 days ago on 06/17/2024. What links here