Is there a way to exclude multiple fields in Dozer, when source and target classes are the same?
I am using it like this:
<mapping map-null="false" wildcard="true">
<class-a>com.abc</class-a>
<class-b>com.abc</class-b>
<field-exclude>
<a>field1</a>
<b>field1</b>
</field-exclude>
<field-exclude>
<a>field2</a>
<b>field2</b>
</field-exclude> ....
</mapping>
It seems so funny to write same name when it's known that it'll always be same for all... Is there any alternative?
I found this post in Google, but I configure Dozer via annotations so the existing answer didn't help me.
In order to exclude a field from mapping via annotations use
@Mapping("this")
on the field.