automapper-plus-bundle
automapper-plus-bundle copied to clipboard
Mapper order issue
I have mapper order issue:
If one of Mapper in order is higher and it extends (copyFrom) from one of lower it will throw exception that no registered mapper here. I think this is very urgent error.
Hi @fractalzombie, can you provide a code sample for this issue? Or do you mean something like this:
$config->registerMapping(Employee::class, EmployeeListView::class)
->copyFrom(Employee::class, EmployeeDto::class);
$config->registerMapping(Employee::class, EmployeeDto::class)
->forMember('fullName', function (Employee $source) {
return $source->getFirstName() . ' ' . $source->getLastName();
});
For now no, because i alredy don't use this library, i gone from this company, but the issue only in loads, if registered map in alphabetically loads after all is ok, but if inverted it will fail, because no registered map will found.