-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Use mapper.map throw error Mapping not found #249
Comments
Hi @zieglar , can you please provide DoctorInfo and DoctorInfoDto models? It’d be awesome if you could provide a simple reproduce repo as well. Thanks |
|
The stacktrace
tells me that it errors out at this line: setMember(mapArray(mapInitializedValue, nestedDestinationMemberKey, nestedSourceMemberKey, undefined, mapper, errorHandler)); which means that Automapper is trying to map an Array of Object that wasn't configured with PS: I can also see that the error message isn't that helpful which I can try to make that better in the next release. |
|
But why mapArray can map it? |
Are you available for a video call so I can take a closer look at your current implementation? |
send you mail :) |
Is your feature request related to a problem? Please describe.
I create MappingProfile with DoctorEntity and DoctorInfoDto in nestjs project
When I use
this.mapper.mapArray(records, DoctorInfoDto, DoctorEntity)
result is ok,
But When I use
this.mapper.map(record, DoctorInfoDto, DoctorEntity)
throw error
Mapping not found for source function Array() { [native code] } and destination function Array() { [native code] }
use
this.mapper.mapArray([record], DoctorInfoDto, DoctorEntity)
is ok...Describe the solution you'd like
fix this error
The text was updated successfully, but these errors were encountered: