Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Wrong result if copying set in the constructor #487
I am using builder pattern to instantiate objects of A and I'm copying the set in the constructor to guarantee that A is immutable:
In the result there is an A with only one object of B in the set whilst there should be more of them.
After some of debugging I found that the sequence of actions is as follows:
so I had a think about it, it won't be really trivial to do so might take some time....
for jdbc the problem is that we only know we are on the next root object once we are there and by them the ResultSet does not point to the previous object.
My thinking now is that the JoinMapper will map to an intermediary builder that will be use as a source for the instantiator - or mapper.
so pushed 4.0.0 last night it should fixed that, but you will need to add @ModifyInjectedParams annotation to the class - I meant to have flag in the mapper but it's not accessible will be fix in 4.0.1 where you will need to call assumeInjectionModifiesValues() on the factory.