Helpful error message when using multiple `@AutomapConstructor` with `argNameBasedConstructorAutoMapping` setting
See original GitHub issueI figured I could use multiple @AutomapConstructor
annotations in a class when using argNameBasedConstructorAutoMapping
setting.
It seems to work pretty well in the dev environment (just lucky) but in real environment Mybatis throws an exception with a message of the form below.
Constructor auto-mapping of ''{1}'' failed because ''{0}'' were not found in the result set Available columns are ''{2}'' and mapUnderscoreToCamelCase is ''{3}''."
This kind of message does not provide enough clues to find the root cause.
I think it’s good to be precise with the error message.
Please check the PR https://github.com/mybatis/mybatis-3/pull/2627. Thank you.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Index (mybatis 3.5.11 API)
argNameBasedConstructorAutoMapping - Variable in class ... Assign a function for producing a conflict error message when contains value with the same key.
Read more >mybatis-3 - bytemeta
Helpful error message when using multiple `@AutomapConstructor` with `argNameBasedConstructorAutoMapping` setting. dpawlak-pgs. dpawlak-pgs OPEN.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s a ‘known issue’ ™️ We decided not to fix it because there may be many existing solutions that rely on the current behavior without realizing it.
Thank you for the explanation and the PR, @sogoagain !