When classes being mapped have multiple super classes, super mappings are processed multiple times.
So if you have:
class TestClassA extends SuperClassA1{...}
class SuperClassA1 extends SuperClassA{...}
..and..
class TestClassB extends SuperClassB1{...}
class SuperClassB1 extends SuperClassB{...}
and mappings like so:
<mapping>
<class-a>TestClassA</class-a>
<class-b>TestClassB</class-b>
</mapping>
<mapping>
<class-a>SuperClassA</class-a>
<class-b>SuperClassB</class-b>
</mapping>
<mapping>
<class-a>SuperClassA1</class-a>
<class-b>SuperClassB1</class-b>
</mapping>
and do:
TestClassA a = new TestClassA();
dozerBeanMapper.map(a,TestClassB.class);
The fields defined in SuperClassA will be mapped twice. This is especially apparent in collection cases as the final mapped class will have the amount of collection items doubled.
Failing test and all test classes are in the attached ZIP file.
Failing unit test and all test classes are attached in the zip.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
A Quick failing unit test with the associated test classes
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Last edit: Anonymous 2014-04-29
fixed in trunk