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
Constructor auto mapping could fail when columnPrefix is specified in the parent resultMap #1495
Database vendor and version
Test case or example project
Steps to reproduce
Run FooMapperTest to find one object Foo with an immutable Bar from DB
get a Foo with a Bar constructed by autoMapping with columnPrefix "b_"
An exception thrown with message:
Thank you for the report & repro, @hiirage !
There seems to be a few issues indeed and I will try to fix them, but you should know that columnPrefix is not used in constructor auto-mapping.
In your demo, for example,
Personally, I recommend explicit mapping for constructor.
Both this issue and #1496 should be fixed in the latest 3.5.1-SNAPSHOT.