Sometimes, we need to copy part of the properties of an object into a different one.
The simplest thing would be to do the following:
Set obj1.FirstName = obj2.FirstName
Set obj1.SecondName = obj2.SecondName
What happens if the object contains a large number of properties? or we just want to extract an important group of data, and complement the information in another object?
Having the following classes:
Class Kurro.PersonalInfo Extends %Library.SerialObject
{
/// Code of personal
Property Code As %String;
/// First name of personal
Property FirstName As %String;
/// Second name of personal
Property SecondName As %String;
/// Date of birthday of personal
Property DateOfBirthday As %DateTime;
/// Passport ID number
Property PassportId As %String;
}
Class Kurro.NameInfo Extends %Library.SerialObject
{
/// First name of personal
Property FirstName As %String;
/// Second name of personal
Property SecondName As %String;
/// Date of birthday of personal
Property DateOfBirthday As %DateTime;
/// Relationship
Property Relationship As %String;
}




