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
There is case that a TypeHandler is incorrectly selected for a nested select query parameter #1551
Comments
Hi @dezhishen , Could you provide a demo project with a minimum set of tables/columns? |
@harawata
ProductSku.class
ProductInfo.class
ProductResp.class
ProductMapper.xml
ProductMapper.class
Call function selectAllInfo
This code will use ID when there are two column that their names are ID without same type. |
Thanks for the update, @dezhishen ! Actually, MyBatis should check the value of
I am not sure how to fix this cleanly yet. |
@dezhishen @harawata mysql驱动包5.1及以上会产生这个问题。按你的修改可以解决这个问题,如果怕引发其他bug可以改用5.0的驱动包试试。 |
通过另外一种
There are another way to use the tag resultMap:
|
@huangdx0726 @dezhishen , Please use English as much as possible. |
Change to refers useColumnLabel at UnknownTypeHandler
@dezhishen Sorry for late fixing. We fixed this issue at now and will release on next maintenance version(3.5.4). If you have a time, I would be happy that confirm this issue can be resolved using 3.5.4-SNAPSHOT. |
Change to refers useColumnLabel at UnknownTypeHandler
there are two table with the same column name 'ID' and without the same type
there are error info
I debug it and try fix it
old code:
this is my code:
getColumnName = > getColumnLabel
it works but i don't know there are any other bugs after i fixed this bug
The text was updated successfully, but these errors were encountered: