My target class has a property which the source class is lacking. To this target property I would like to be able to assign a particular value during the mapping. According to the documentation Operation::setTo seems to do the job, but at the moment it ignores target properties for which there are no equivalent source properties. Is there any reason behind this behaviour? I looked at the Options object too, but see no relevant setting. I know I could define a callback, but Operation::setTo is way more elegant in this case.
My target class has a property which the source class is lacking. To this target property I would like to be able to assign a particular value during the mapping. According to the documentation Operation::setTo seems to do the job, but at the moment it ignores target properties for which there are no equivalent source properties. Is there any reason behind this behaviour? I looked at the Options object too, but see no relevant setting. I know I could define a callback, but Operation::setTo is way more elegant in this case.