OCLOperators deepclone
(Created page with " object.deepclone(viewmodelname) returns a deepclone copy of the object - viewmodel decide copy depth Deep clone is a special case of Transform usin...") |
Hans Karlsen (talk | contribs) No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
object.deepclone(viewmodelname) returns a deepclone copy of the object - viewmodel decide copy depth | object.deepclone(viewmodelname) returns a deepclone copy of the object - viewmodel decide copy depth | ||
Deepclone is a special case of [[OCLOperators transform|Transform]] using the same class as both the source and the target. | |||
For | 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]] | |||
{{Edited|July|12|2024}} |
Latest 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 more than 7 months ago on 06/04/2024. What links here