Mybatis-Error setting null parameter

前端 未结 2 1071
梦毁少年i
梦毁少年i 2020-12-31 06:10

I used mybatis-spring-1.0.3-SNAPSHOT mybatis-3.0.6 spring3.0.6.I tried to delete record from a table like this:

        

        
2条回答
  •  温柔的废话
    2020-12-31 06:59

    The problem is that since the 3.0.x versions the default JDBC type for null parameters is Types.OTHER which not supported by some JDBC drivers like Oracle 10g.

    Here a post that explain this issue.

    The solution I found is very simple, I set jdbcTypeForNull to NULL in the configuration file.

    
        
        
            
        
    
        
        ....
        
    
        
        ....
       
    
    

提交回复
热议问题