-
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
Missing TypeHandler returns null return than throwing an exception #9
Comments
In orde to speed up the resolution, could you create a test for this? |
Personally, if it wasn't possible to find an appropriate mapper for a type then I would expect it to throw an exception. In the case above, your date column would've been null and you would've had no idea why that was the case. Would it not be better to ensure that you have a type handler for every type that you've trying to retrieve? |
Agreed. |
Hi, since I upgraded to mybatis 3.2.2 I have started seeing an issue that I think may be related to this change. I opened up the issue and it is described here: issue61 |
… account Fail-fast is nice, but it practically prevents MyBatis from using runtime JDBC type information to resolve type handler. Related to mybatis#9 mybatis#19
I run into an issue where I mapped a result in a resultMap to Joda's DateTime but didn't register a TypeHandler. Rather than failing with a new error message, it looks like the org.apache.ibatis.executor.resultset.FastResultSetHandler class is returning null in the getPropertyMappingValue method (somewhere near line 316).
This code should be more like this:
Instead, it looks like this (notice the return null at the end):
The text was updated successfully, but these errors were encountered: