-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new option for specify the behavior when detects an unknown column of automatic mapping target #585
Add new option for specify the behavior when detects an unknown column of automatic mapping target #585
Conversation
…n of automatic mapping target
Hi @kazuki43zoo. Looks good and useful. The only comment I would make is that I would not expect to find code in an enumeration (thought it may be a matter of taste indeed). |
Hi @emacarron , thanks for comment! |
I would appreciate it. I would say it will fit better with current code style. Thanks in advance and thank you! |
I've improved message via 09cb34a. |
…knownColumnBehavior Add new option for specify the behavior when detects an unknown column of automatic mapping target
Thanks for merging!! I want to backport to 3.3.x line. Is OK? |
And i will fix docs at later. |
@emacarron plz set milestone !! |
done! :) 2016-02-26 17:00 GMT+01:00 Kazuki Shimizu notifications@github.com:
|
Fix version 3.3.2 -> 3.4.0 for #585
@jarvan4dev Could you provide a reproduce project that can be run on GitHub ? |
@jarvan4dev Not need to provide your real project. I need a minimum reproduce project. |
Please check query that do mapping using |
Sorry, you can forget my above comment. |
There will be false-positives when using a nested result map (a result map with collection or association). If there is a simple fix, that would be great. |
Hi @harawata, |
@jarvan4dev See http://www.mybatis.org/mybatis-3/configuration.html#settings. |
@jarvan4dev , @kazuki43zoo ,
|
@harawata Thanks for your answer ! |
Yes. If |
@jarvan4dev Thanks for reply ! If you want to use the auto-mapping for nested object(result map), this feature cannot report unknown column accurately. This is a known limitation. I will consider to apply this limitation to the reference documentation. |
That's correct.
If you don't need auto-mapping on nested result maps, then using PARTIAL would be a good solution. |
…ppingUnknownColumnBehavior Add new option for specify the behavior when detects an unknown column of automatic mapping target
Fix version 3.3.2 -> 3.4.0 for mybatis#585
I added a new option for specify the behavior when detects an unknown column (or unknown property type) of automatic mapping target.
Options are as follow:
SqlSessionException
with detail)I think this option is useful for detects a type mistake during development.
What do you think ?