Closed roookeee closed 5 years ago
About the null-ability checks the example shows: maybe add a .nullsafe()
fluent operation that makes all map
's etc null-safe in the current .from()...to()
chain? That would be fine I guess - explicit implicitness :). Will split the tickets either way (see #21).
I just looked at the benchmark suite for java mapping frameworks and realized that the ModelMapper implementation doesn't have / use this kind of feature.
Will have to reconsider / reevaluate this feature
Will exclude this (if its happening) from 1.3.0 as I don't want to rush it
Gave this some thought and won't implement it. Reason: huge complexity, unintuitive, less gain than previously thought, no good syntax options
Say you have a
Customer
object as a field inside yourOrder
object and want to extract both the cutomers name and adress to two separate fields of the output object. With datus you have to dogetCustomer()
twice which is cluttered and quite cumbersome.See this benchmark suite with the following manual code:
which currently looks like this:
We have to do something about this and null checking is a problem too :/