Skip to content
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

[错误报告]: 描述DataChangeRecorderInnerInterceptor当实体没有@TableId时 拦截Update 会发生异常 #6578

Open
3 tasks done
frankwondon opened this issue Nov 7, 2024 · 0 comments

Comments

@frankwondon
Copy link

确认

  • 我使用的版本是最新版, 并且使用插件确认过项目里无依赖版本冲突
  • 我已经在 issue 中搜索过, 确认问题没有被提出过
  • 我已经修改标题, 将标题中的 描述 替换为遇到的问题

当前程序版本

3.5.9

问题描述

DataChangeRecorderInnerInterceptor#buildColumns2SelectItems 当实体没有@TableId时 拦截Update 会发生异常,经过Debug发现问题如下

image

详细堆栈日志

ERROR c.l.g.p.f.c.mybatis.DataChangeRecorderInterceptor - try to get record tobe updated for selectStmt=SELECT ui_key, ui_scope, field_name, pull_type, column_name, table_name,  FROM ui_conf_dropdown WHERE (ui_key = ? AND ui_scope = ? AND field_name = ?)
java.sql.SQLSyntaxErrorException: ORA-00936: 缺失表达式

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:628)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:562)
	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1145)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:726)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:291)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:492)
	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:148)
	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:928)
	at oracle.jdbc.driver.OracleStatement.prepareDefineBufferAndExecute(OracleStatement.java:1158)
	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1093)
	at oracle.jdbc.driver.OracleStatement.executeSQLSelect(OracleStatement.java:1402)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1285)
	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3735)
	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3847)
	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1098)
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3225)
	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:459)
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3222)
	at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:175)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:213)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:55)
	at jdk.proxy3/jdk.proxy3.$Proxy372.executeQuery(Unknown Source)
	at com.baomidou.mybatisplus.extension.plugins.inner.DataChangeRecorderInnerInterceptor.buildOriginalObjectData(DataChangeRecorderInnerInterceptor.java:557)
	at com.baomidou.mybatisplus.extension.plugins.inner.DataChangeRecorderInnerInterceptor.processUpdate(DataChangeRecorderInnerInterceptor.java:244)
	at com.baomidou.mybatisplus.extension.plugins.inner.DataChangeRecorderInnerInterceptor.beforePrepare(DataChangeRecorderInnerInterceptor.java:153)
	at com.lenovo.gsc.planning.fccl.common.mybatis.DataChangeRecorderInterceptor.beforePrepare(DataChangeRecorderInterceptor.java:23)
	at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:102)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
	at jdk.proxy2/jdk.proxy2.$Proxy370.prepare(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:61)
	at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
	at jdk.proxy2/jdk.proxy2.$Proxy370.prepare(Unknown Source)
	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:90)
	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)
	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant