Mapping not found error when using nullSubstitution
on array property
#480
Labels
bug
Something isn't working
nullSubstitution
on array property
#480
Is there an existing issue for this?
Describe the issue
If you have to explicitly provide a properties type (e.g. an enum array) and you have to configure a
nullSubstitution
in the mapping, the following error is thrown when trying to map an object:The error only occurs if the property has a value or if the
nullSubstitution
resolves to a non-empty array and the specified type is built-in (e.g.String
orObject
). I think the problem is thatnullSubstitution
(andundefinedSubstitution
andcondition
) callmapper.mapArray
which callsgetMapping
without applying the 'identifier checks' used bymap
.Models/DTOs/VMs
Mapping configuration
Steps to reproduce
Expected behavior
No error should occur, since built-in types should have built-in mappings.
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.3.6
Additional context
No response
The text was updated successfully, but these errors were encountered: