atos1990 / orika

Automatically exported from code.google.com/p/orika
0 stars 0 forks source link

Dynamic mapping always uses existing parent mapper even if it doesn't map all fields #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Register a mapping for types A, B.
Then, dynamically attempt to map sub-types A',B' which extend A and B, 
respectively, but have some additional properties.

What is the expected output? What do you see instead?
A new mapper should be generated for (A',B') which uses the (A,B);
instead, only the existing (A,B) mapper is used, which will fail to map any 
additional properties defined on A' and B'.

On the contrary, if there was no registered mapper for (A,B), a new mapper 
would be generated for (A',B') which maps all the fields. This can lead to the 
result that if you end up needing register a mapping for any types, you then 
must explicitly register all other mappings in that hierarchy; it would be 
better if you didn't.

Original issue reported on code.google.com by matt.deb...@gmail.com on 16 Sep 2012 at 2:05

GoogleCodeExporter commented 9 years ago
Issue 70 has been merged into this issue.

Original comment by matt.deb...@gmail.com on 22 Nov 2012 at 8:53

GoogleCodeExporter commented 9 years ago
Fix merged into current master.

Original comment by matt.deb...@gmail.com on 22 Nov 2012 at 8:55

GoogleCodeExporter commented 9 years ago

Original comment by matt.deb...@gmail.com on 22 Nov 2012 at 8:55

GoogleCodeExporter commented 9 years ago
Fixed in  1.4.0 release

Original comment by matt.deb...@gmail.com on 19 Dec 2012 at 2:07

GoogleCodeExporter commented 9 years ago

Original comment by matt.deb...@gmail.com on 19 Dec 2012 at 2:09