When using a string or a symbol as a model identifier, the getMetadataList will fail. It will definitely call Reflect.getMetadata which throws for non-object targets. Since it gets called with the Symbol/String as a target, the IsObject check will fail in the reflect-metadata package.
Models/DTOs/VMs
No response
Mapping configuration
No response
Steps to reproduce
Create a mapping configuration with a symbol or string as model identifier.
Expected behavior
If the identifier is a string or a symbol, no metadata should be expected. It just acts as an identifier.
Is there an existing issue for this?
Describe the issue
When using a string or a symbol as a model identifier, the
getMetadataList
will fail. It will definitely callReflect.getMetadata
which throws for non-object targets. Since it gets called with the Symbol/String as a target, theIsObject
check will fail in the reflect-metadata package.Models/DTOs/VMs
No response
Mapping configuration
No response
Steps to reproduce
Create a mapping configuration with a symbol or string as model identifier.
Expected behavior
If the identifier is a string or a symbol, no metadata should be expected. It just acts as an identifier.
Screenshots
No response
Minimum reproduction code
No response
Package
Other package and its version
No response
AutoMapper version
8.8.1
Additional context
No response