OCLOperators deepclone
No edit summary
(Adding message template to the top of the page)
Line 1: Line 1:
{{message|Write the content here to display this box}}
  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.
Deepclone is a special case of [[OCLOperators transform|Transform]] using the same class as both the source and the target.

Revision as of 22:24, 16 June 2024

Write the content here to display this box

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 103 days ago on 06/17/2024. What links here