orika-mapper/orika — pull request #3 by papegaaij (2013-03-11 08:40:39+00:00)
Title: Subtypes not mapped correctly for hibernate proxies

When a property is an hibernate proxy for a subtype of the property type and a mapper exists for a supertype of the property type, the mapper for the supertype is used, rather than that of the subtype. This pull request contains a testcase demonstrating the problem and a possible fix.

For some reason, normalizeSourceType first checks for existing mappers, which finds the mapper for the supertype. Removing this check fixes this problem and does not break any of the testcases. It seems that the original problem was fixed in some other way, making the check fox existing mappers redundant.