Is there a way to configure dozer via its xml mapping file to convert a primitive int field value of -1 to a null object reference?
The legacy object model defaults the value to -1, so that zero can be a valid selection.
The newer object model we are mapping to, assumes that non-selected values will be null, and that any initialized object value is valid. I'm hoping to avoid the need to write a custom converter for this case.
Best Answer
You probably already know it, but the only solutions I can see are, either...
2 and 3 are a bit worse than 1, because they pollute the old code with new values handling or the new code with old values handling.