bug 记录

-------------
MySQLIntegrityConstraintViolationException: Column 'serial_id' in where clause is ambiguous  字段是模糊的----------
多表关联时,没有指定改字段是哪个表的

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: 
### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'serial_id' in where clause is ambiguous
### The error may exist in URL [jar:file:/Users/zhz/workspace/zhuxue/zhuxue-service-api/target/zhuxue-service-api-1.0-SNAPSHOT/WEB-INF/lib/zhuxue-dao-1.0-SNAPSHOT.jar!/mapper/OrderInfoMapper.xml]
### The error may involve alipay.openplatform.edu.campus.zhuxuejin.dao.mappers.OrderInfoMapper.searchPageListCount-Inline
### The error occurred while setting parameters
### SQL: SELECT count(1)     from order_info o LEFT JOIN apply_student_info s on o.uid = s.uid     LEFT JOIN user_base_info u on o.uid = u.uid      WHERE  serial_id = ?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'serial_id' in where clause is ambiguous
; SQL []; Column 'serial_id' in where clause is ambiguous; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'serial_id' in where clause is ambiguous
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

阅读更多
个人分类: BUG
上一篇根据字段不同值关联查询不同表的问题
下一篇Maven最佳实践 划分模块 配置多模块项目 pom modules
想对作者说点什么? 我来说一句

bug记录文档模板

2018年05月04日 4.11MB 下载

没有更多推荐了,返回首页

关闭
关闭