NutzCN Logo
问答 生成sql关键词问题
发布于 2440天前 作者 qq_d6c9c504 2065 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

我使用nutzwk 在数据字典加了参数desc,以前执行sql没问题,这几天才发现这功能不好使了,desc是关键词,不知道怎么让他生成desc带引号。执行sql是

UPDATE sys_dict SET parentId='',code='感谢您的回复,我们会尽快补充资源(有些可能是百度云缓存,可刷新百度云页面试试)',type=0,desc='用户输入失效电影格式正确时候返回内容',hasChildren=false,opBy='ade5c019ef7b40f3b1685c72122e2007',opAt=1524037709  WHERE id='e7be807e0abc402eb766adaa1d36c0ba'
2018-04-18 15:48:29,172 com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:147) ERROR - merge sql error, dbType mysql, sql : 
UPDATE sys_dict SET parentId=?,code=?,type=?,desc=?,hasChildren=?,opBy=?,opAt=?  WHERE id=?
com.alibaba.druid.sql.parser.ParserException: ERROR. token : DESC, pos : 49
	at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:605)
	at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.primary(MySqlExprParser.java:167)
	at com.alibaba.druid.sql.parser.SQLExprParser.parseUpdateSetItem(SQLExprParser.java:1156)
	at com.alibaba.druid.sql.dialect.mysql.parser.MySqlSelectParser.parseUpdateStatment(MySqlSelectParser.java:292)
	at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseUpdateStatement(MySqlStatementParser.java:246)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:187)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:147)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:142)
	at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:53)
	at com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:145)
	at com.alibaba.druid.filter.stat.StatFilter.createSqlStat(StatFilter.java:630)
	at com.alibaba.druid.filter.stat.StatFilter.statementPrepareAfter(StatFilter.java:305)
	at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:124)
	at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:448)
	at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
	at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:331)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:299)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:90)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor._exec(CachedNutDaoExecutor.java:317)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:111)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)

6 回复

还有别的办法吗?我们运行了两年了,怎么突然不好使了

突然不好使了,是不是更新了jar版本,看看变更了什么,降级试下

刚才检查了下没人动过版本升级,奇怪了,因为有段时间没用了,刚用不好使了

能有啥配置,让生成sql的对特定列的加引号?不然要改很多类desc了

老老实实改字段名...[笑哭]

添加回复
请先登陆
回到顶部