Open GoogleCodeExporter opened 8 years ago
What if we updated the debug logging to include information about the
properties that were skipped for each type during mapper generation?
Original comment by matt.deb...@gmail.com
on 13 Sep 2012 at 12:49
That would definitely help, though ideally, there would be a feature similar to
ModelMapper's modelMapper.validate(), which throws an exception if any of the
registered mappings do not properly evaluate. Would this be possible?
Original comment by dain.kap...@gmail.com
on 13 Sep 2012 at 2:58
It's definitely worth looking at.
Could you give a little more detail ?:
By "not properly evaluate" do you mean that you explicitly registered some
mapping and it was not used?
Or you explicitly registered some fields on a particular mapping and they were
ignored?
Or you let Orika auto-map, and it "missed" matching up some fields?
Or something else?
Original comment by matt.deb...@gmail.com
on 13 Sep 2012 at 8:46
>> By "not properly evaluate" do you mean that you explicitly registered some
mapping and it was not used?
>> Or you explicitly registered some fields on a particular mapping and they
were ignored?
>> Or you let Orika auto-map, and it "missed" matching up some fields?
>> Or something else?
All of the above? Essentially, evaluate a source -> destination mapping, and if
property in the destination object wasn't mapped, for any reason, throw an
error. This operates on the assumption that destination objects are just DTOs
where all fields are meaningful (the field wouldn't be there if you didn't want
it filled). Perhaps more sophisticated rules could be devised, but having a
function that I could call that would evaluate all _registered_ mappings would
be fantastic. (mappings that happen dynamically do not need to be included.)
What do you think?
Original comment by dain.kap...@gmail.com
on 30 Sep 2012 at 1:28
Original issue reported on code.google.com by
dain.kap...@gmail.com
on 12 Sep 2012 at 4:33