I am using Dozer to map between a Document class to DocumentManagementBean class, both of my own making. Both have a property, with getters and setters, of Joda DateTime type, called dateAdded.
When Document object d
has property dateAdded
=x, calling mapper.map(d, DocumentManagementBean.class)
all fields get auto-mapped correctly (since I have full control over code base I am able to get away with no dozer-config and rely simply on matching property names), EXCEPT the dateAdded
field, where the new DocumentManagementBean dmb
ends up with the current DateTime in its dateAdded
property, instead of x from the d
object.
I am expecting Dozer to try to call
dmb.setDateAdded(d.getDateAdded());
and just bring the value of dateAdded from source to target, but it seems to be creating new DateTime for dmb object an then leaving it alone.
Can anyone shed some light on this for me please?