When using EF/EFCore and have an entity that have references to the parent (you should avoid it) the call to ResolveTypeMap will go into an circular lookup.
With this changes the logic to see if IsMatch is changed to only see if the source/dest is of collection types and in that case we try to create the expression to use. During creation of the expression we can call the ResolveTypeMap (without going into the circular lookup), and if we not get any equivalent mapping we find the next IObjectMapper that can handle the source/dest type and if no other is found we will fallback into the CollectionMapper (that was the only fallback mapper before this change).
When using EF/EFCore and have an entity that have references to the parent (you should avoid it) the call to
ResolveTypeMap
will go into an circular lookup.With this changes the logic to see if
IsMatch
is changed to only see if the source/dest is of collection types and in that case we try to create the expression to use. During creation of the expression we can call theResolveTypeMap
(without going into the circular lookup), and if we not get any equivalent mapping we find the nextIObjectMapper
that can handle the source/dest type and if no other is found we will fallback into theCollectionMapper
(that was the only fallback mapper before this change).https://github.com/AutoMapper/AutoMapper.Collection.EFCore/issues/13