#1135 added tests and implementation for overloading#1167
#1135 added tests and implementation for overloading#1167quantumlexa wants to merge 4 commits intomapstruct:masterfrom
Conversation
|
(Message from the pull-request-builder): Admins, please verify this patch for it to build in the pull-request-builder. |
filiphr
left a comment
There was a problem hiding this comment.
It looks better now.
By the way, I see that there are a lot of formatting changes, that are not in the same style as our settings. Can you please reformat the code with the configured style settings. This are the settings: Eclipse settings and IntelliJ settings.
By the way you don't have to squash your changes in the PR, we can do it when we do the merge :).
| sourceReadAccessors = initSourceReadAccessors( getSourceParameters(), mappingOptions ); | ||
| } | ||
|
|
||
| private Map<String, Accessor> initSourceReadAccessors( List<Parameter> sourceParameters, |
There was a problem hiding this comment.
Can you extract this method to the MappingMethodUtils? The code here and in the SourceMethod is exactly the same.
There was a problem hiding this comment.
Done.
Thanks for pointing me to the Idea code style file.
|
ok to test |
|
This is a comment from the previous PR: @agudian, I had another look at the PR. There are some issues which are addressed in my second review. However, I don't think that there is an issue with the selectors:
I also forgot to write in my review comment: @quantumlexa Can you perhaps add more properties and make sure that all the branches in |
|
@filiphr Could don't replay on your comment.
What kind of scenarios you are talking about? ` static class Target { |
What I meant is to have a case when I set a breakpoint at those 2 places and they were never hit. Also this won't work for Also this to the SourceTargetMapper: @InheritInverseConfiguration
Source targetToSource(Target target);For The reason for this is that the As an idea consider creating the
|
|
By the way @quantumlexa you can add an |
|
Hi, @filiphr to my test with reverse mapping succeeded (~ 200 other test failed ) |
|
@quantumlexa I think that you are looking at the wrong location. Maybe that needs to be done in the Can you perhaps push the test with the inverse? |
|
@filiphr |
|
@quantumlexa I know how you can approach the problem, and I think you can solve it :). The
Maybe you can also see PR #1157 where I have added the reverse source parameter to the |
|
@quantumlexa I forgot to write. This should also work for nested target properties. For example for the following mapping: And the model looks like: class Target {
private NestedTarget nested;
//the normal getters and setters
public void setNested(NestedSource nestedSource) {
//Here some custom conversion
}
}
class Nested {
private Date updateOn;
//This is like your example in the PR
}
class Source {
private NestedSource nestedSource;
//getters and setters
}
class NestedSource {
private long updateOnTarget;
//getters and setters
}I think with the current state of the PR it won't work as it only considers the read accessors of the first source type. |
|
@quantumlexa do you still have time for this PR? Is there something that we can help you out to bring it to the finish line? We are planning to do a release next week, if we don't manage to resolve this PR until then, we'll merge it for another release |
|
Hi, @filiphr |
|
@quantumlexa no problem, take your time. If you manage to do it by the beginning of next and it works OK, then we will include it in Beta3, otherwise we'll do it in the release after Beta3. We will also try to do the release after Beta3 faster so we can also have a Final release soon after that. |
|
@quantumlexa do you need some help with the PR? Do you think that you will have time to finish it up? |
|
hi, @filiphr |
recreated PR due to some errors in git