mybatis collection lable type Will affect the type of my other fields

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mybatis collection lable type Will affect the type of my other fields

刘勇平
## MyBatis version
3.5.4
## Database vendor and version
mysql 5.7







## Test case or example project

## Steps to reproduce

mysql db column type 

<a imageanchor="1" href="about:invalid#zClosurez" style="clear: left; margin-bottom: 1em; margin-right: 1em; float: left;" tabindex="1">微信图片_202005201116322223.png











my pojo type 

<a imageanchor="1" href="about:invalid#zClosurez" style="clear: left; margin-bottom: 1em; margin-right: 1em; float: left;" tabindex="1">TIM截图202005291624133338.png


















































mybatis xml config 

TIM截图20200529162548333333.png


I use the collection lable and the oftype is Long 
then i find my gradeName type was changed 

TIM截图202005291629533330.png




I set the grade type is String ,here i saw ,it was Long ,and  the same as  collection oftype ;

my navicat result table is 


TIM截图2020052916340333333335.png


## Actual result

so error 


TIM截图202005291633333333541.png



i did not know why it was happened

if i change the collection oftype to String , It will be ok。
 

TIM截图5.png



## Expected result



TIM截.png





please help me 

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/601ec14e-e0ca-4a10-a7af-13723e747a01%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: mybatis collection lable type Will affect the type of my other fields

Iwao AVE!

On Fri, May 29, 2020 at 5:47 PM 刘勇平 <[hidden email]> wrote:
## MyBatis version
3.5.4
## Database vendor and version
mysql 5.7







## Test case or example project

## Steps to reproduce

mysql db column type 

微信图片_202005201116322223.png











my pojo type 

TIM截图202005291624133338.png


















































mybatis xml config 

TIM截图20200529162548333333.png


I use the collection lable and the oftype is Long 
then i find my gradeName type was changed 

TIM截图202005291629533330.png




I set the grade type is String ,here i saw ,it was Long ,and  the same as  collection oftype ;

my navicat result table is 


TIM截图2020052916340333333335.png


## Actual result

so error 


TIM截图202005291633333333541.png



i did not know why it was happened

if i change the collection oftype to String , It will be ok。
 

TIM截图5.png



## Expected result



TIM截.png





please help me 

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/601ec14e-e0ca-4a10-a7af-13723e747a01%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2Buep2R3eQwL-A_gnrVu6%2BeaexOsVOhu5g2-_CO2U_HTOKFjxg%40mail.gmail.com.