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

發佈了24 篇原創文章 · 獲贊 51 · 訪問量 27萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章