You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a class, having an attribute whose value is an array of custom class, is extended by another class via MapperOmitType, it produces an error in inheritAutoMapMetadata -> getMetadataList -> isDateConstructor and automaps the fields incorrectly. This issue is produced because the metaDataList gets the array type from the AutoMap decorator as undefined on null and the isDateConstructor then throws the error that undefined cannot be converted.
Here is the class that is extending PersonnelUpdateInput and the PersonnelUpdateInput class has the AutoMap decorator with array type explicitly defined.
Is there an existing issue for this?
Describe the issue
When a class, having an attribute whose value is an array of custom class, is extended by another class via MapperOmitType, it produces an error in inheritAutoMapMetadata -> getMetadataList -> isDateConstructor and automaps the fields incorrectly. This issue is produced because the
metaDataList
gets the array type from the AutoMap decorator as undefined on null and theisDateConstructor
then throws the error that undefined cannot be converted.Here is the class that is extending
PersonnelUpdateInput
and thePersonnelUpdateInput
class has the AutoMap decorator with array type explicitly defined.Here is the PersonnelUpdateInput attribute:
And here is the error
https://automapperts.netlify.app/docs/strategies/classes#array-type
Models/DTOs/VMs
No response
Mapping configuration
No response
Steps to reproduce
No response
Expected behavior
Should work fine with array types defined explicitly
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: