-
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
TypeHandler lost information of actualTypeArguments when class is ParameterizedType #2187
Comments
@harawata hi. |
Hello @DavidTangWei , It is a known limitation. |
@harawata |
@wyl0706 There will be a new comment when/if there is any news. :) |
@harawata any update on this issue? |
I am trying to work on this https://github.com/FlyInWind1/mybatis-3 |
I have impl ListTypeHandler. I pass ResolvedType (wrap jackson JavaType) to TypeHandler, instead of Class. |
any update on this issue? |
Any updates on this issue? |
Any update on this? |
Is there any update?I had the same problem |
Any updates on this? I want to create a common List TypeHandler for a PostgreSQL composite type array column. But it might not be possible to implement it without getting the actualTypeArguments. |
MyBatis version
3.4.5
Database vendor and version
mysql 5.7+
Test case or example project
deserialize data in table
test
to POJOTest
using mybatis mapper.xml.After debug the source code of mybatis, the class in the constructor of TypeHandler is get from
org.apache.ibatis.reflection.Reflector#setTypes
. But when the type isParameterizedType
to be added, ignore theactualTypeArguments
and only addrawType
.Expected result
TypeHandler need to get the real
ParameterizedType
. Otherwise, I need to write many useless code to create many class inherit TypeHandler to pass theParameterizedType
manual.Actual result
TypeHandler lost information of actualTypeArguments when class is ParameterizedType
The text was updated successfully, but these errors were encountered: