New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properties with similar names map to undefined #527
Comments
Thanks for reporting. The naming convention algorithm isn't smart enough to determine whether
when there is The workaround is to use |
Hello, as this was a blocker on my current project I decided to dig into it a little and found out the issue is in the flattening algorithm, where the shared suffix is being searched in source object, however, and that is my solution to the problem, it's not checked whether it's actually object and thus needs to be flattened. In the reference source object, primitive values are all undefined, but when there's nested objects, they're expanded as objects with their own properties. So this fix verifies, that the property to be flattened is an object. I'm honestly wasn't sure if I should add it only at the two places I did or to just add it to the |
Is there an existing issue for this?
Describe the issue
inspectionOrderStatusId
will be undefined in these mapsModels/DTOs/VMs
No response
Mapping configuration
No response
Steps to reproduce
No response
Expected behavior
the values should map to their correct values
Screenshots
No response
Minimum reproduction code
No response
Package
@automapper/core
@automapper/classes
@automapper/nestjs
@automapper/pojos
@automapper/mikro
@automapper/sequelize
Other package and its version
No response
AutoMapper version
8.7.7
Additional context
No response
The text was updated successfully, but these errors were encountered: