"COMMENT"=#{comment}沒加双引号,的问题和oracle的字段出现冲突

DBook [id=102, bookName=123, author=123, price=123.0, ddPrice=123.0, company=123, publishTime=Sat Oct 19 00:00:00 CST 9, publicCount=123, isbn=123, printTime=Sat Oct 19 00:00:00 CST 9, printCount=123, saleCount=123, cateId=5, openEditor=123, src=1570696290288_925843265.jpg, editorRcmd=123, contentValidity=123, authorValidity=123, catalog=123, comment=123]
org.apache.ibatis.exceptions.PersistenceException:

Error updating database. Cause: java.sql.SQLSyntaxErrorException: ORA-01747: user.table.column, table.column 或列说明无效

The error may involve org.consola.com.dao.BookDao.updateOneBook-Inline

The error occurred while setting parameters

SQL: UPDATE D_BOOK SET BOOK_NAME=?,AUTHOR=?,PRICE=?,DD_PRICE=?,COMPANY=?,PUBLISH_TIME=?,PUBLIC_COUNT=?,ISBN=?,PRINT_TIME=?,PRINT_COUNT=?,SALE_COUNT=?,CATE_ID=?,OPEN_EDITOR=?,SRC=?,EDITOR_RCMD=?,CONTENT_VALIDITY=?,AUTHOR_VALIDITY=?,CATALOG=?,COMMENT=? WHERE “ID”=?

Cause: java.sql.SQLSyntaxErrorException: ORA-01747: user.table.column, table.column 或列说明无效

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:154)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:54)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
at com.sun.proxy.$Proxy7.updateOneBook(Unknown Source)
	<!-- 4.2 修改 -->
  	<update id="updateOneBook" parameterType="DBook" >
		UPDATE D_BOOK SET BOOK_NAME=#{bookName},AUTHOR=#{author},PRICE=#{price},DD_PRICE=#{ddPrice},COMPANY=#{company},PUBLISH_TIME=#{publishTime},PUBLIC_COUNT=#{publicCount},ISBN=#{isbn},PRINT_TIME=#{printTime},PRINT_COUNT=#{printCount},SALE_COUNT=#{saleCount},CATE_ID=#{cateId},OPEN_EDITOR=#{openEditor},SRC=#{src},EDITOR_RCMD=#{editorRcmd},CONTENT_VALIDITY=#{contentValidity},AUTHOR_VALIDITY=#{authorValidity},CATALOG=#{catalog},"COMMENT"=#{comment} WHERE "ID"=#{id}
	</update>

“COMMENT”=#{comment}沒加双引号,的问题和oracle出现冲突

猜你喜欢

转载自blog.csdn.net/qq_43071699/article/details/102486093
今日推荐