modelmapper / modelmapper.github.io

ModelMapper website
http://modelmapper.org
0 stars 3 forks source link

getting-started guide is outdated? #2

Closed jonua closed 4 years ago

jonua commented 6 years ago

Hi,

now, in getting started guide in section "Expicit mapping" placed example:

modelMapper.addMappings(mapper -> {
  mapper.map(src -> src.getBillingAddress().getStreet(),
      Destination::setBillingStreet);
  mapper.map(src -> src.getBillingAddress().getCity(),
      Destination::setBillingCity);
});

But in current latest version (1.1.2) org.modelmapper.PropertyMap is not a functional interface. Example from modelmapper repo is actual

Please, fix your documentation

chhsiao90 commented 5 years ago

The functional interface is supported by org.modelmapper.ExpressionMap ExpressionMap.

And it looks like we have wrong example, I will update it.

modelMapper.typeMap(Order.class, OrderDto).addMappings(
  mapper -> {
    ...
  });
chhsiao90 commented 4 years ago

Thanks for reporting the issue, issue fixed in 10a7d967.