Replies: 3 comments 11 replies
-
That definitely sounds like a regression. Would you mind providing a quick simple reproduce so I can take a closer look? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I am currently using 7.2.1 but I upgraded when I noticed this issue, I was on ^7.0.2 so it could have started with one of the minor version updates. I will gladly provide more info upon request, I enjoyed using your library as it saved me a lot of time and code. I can't risk the data loss due to regression bugs so i'm gonna switch to Morphism. Best of luck. |
Beta Was this translation helpful? Give feedback.
-
This issue seems out of the blue, I remember this working properly after updating to v7 but now all the sudden mapped object contains fields with a value of undefined where they did not exist in the source object.
When I send a patch operation to my api the dto may only contain the fields I want to update, the mapped output contains the missing fields with values set to undefined. This is causing the collection document fields to be changed to null which is very bad since the data is now lost.
I am hoping that I made a mistake somewhere but I don't remember having to do anything after the v7 install to get the missing source fields to be ignored in the destination. This can be a huge problem in production causing data loss, I need to figure out if the mapper lib just doesn't work this way anymore or that I inadvertently changed something to cause this behavior.
SectionDto { feature: 'listings', slug: 'hello-slug' }
SectionMongoDocument { feature: 'listings', slug: 'hello-slug', name: undefined, order: undefined, published: undefined, description: undefined, icon: undefined, categories: undefined }
Beta Was this translation helpful? Give feedback.
All reactions