Replies: 1 comment 1 reply
-
|
Hi @nlemoine, the mapper cannot map properties on existing objects, and probably never will be able to. One of the rules that this library wants to maintain is to have objects in a valid state as soon as they are created. The example you gave goes against this rule. Hope you'll find a way to solve your issue. 😊 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a specific situation where I want to map properties of an already existing/memoized object.
Here's some code to make it more clear.
I want to map protected properties of the child class, not the ones from the constructor and I get find my way around it, not matter how I try to build my object, it's either building new instances (if I remove the constructor and build the object another way) or returns the memoized instance (but does not map extra protected props).
It's obviously the way Valinor works but I just wonder if someone had a solution to trick this.
Beta Was this translation helpful? Give feedback.
All reactions