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

猜你喜欢

转载自blog.csdn.net/zhanghongzheng3213/article/details/52371358