mybatis 使用时 报错集锦

原sql


		
			update xxx set state = 1  where id= #{item.id}  and type = #{item.type} 
		 
	
错误1:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update xxx set state = 1  where id = 60 ' at line 5

以上错误原因:separator=";"属性需要加上,因为两个sql语句之间间隔需要用分号,不需要open close 属性,加了也是报错

错误2:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: An invalid property 'JdbcType' was found in mapping #{__frch_item_0.type,JdbcType=BIGINT}.  Valid properties are javaType,jdbcType,mode,numericScale,resultMap,typeHandler,jdbcTypeName

以上错误原因:JdbcType 应该是jdbcType

你可能感兴趣的:(sql,mybatis)