Targeted object will be null when the mapped source fields are null

7 views
Skip to first unread message

Sébastien Charland

unread,
Feb 4, 2019, 2:46:15 PM2/4/19
to Dozer Mapper
Hi, 

just wondering,... is there a way (without having a custom converter) to configure Dozer with this kind of behavior:

When all source fields are null (but the source object is not) then the returned object is null. 

thanks.


Sébastien Charland

unread,
Feb 4, 2019, 3:01:55 PM2/4/19
to Dozer Mapper
Just for more info: 

I have one source object converted into two objects. 

All of the source fields for one of the two objects are null. 

In this case, I don't want to have a new object with null fields. For me, the object must not be created because all source fields are null.  
Reply all
Reply to author
Forward
0 new messages