用hibernate进行映射查询时,出现Caused by: java.sql.SQLException: Column ‘id’ not found 异常,检查数据库表及映射都有id且已经正确映射,google后发现原因为:
Your query doesn’t return a field named id即查询sql中没有查询出主键id列,但返回结果集中用到,故出现异常特此记录。
详细解答见下:
http://stackoverflow.com/questions/34164411/caused-by-java-sql-sqlexception-column-id-not-found
原文地址:https://blog.csdn.net/motrsky/article/details/52369614
hibernate 出现Caused by: java.sql.SQLException: Column 'id' not found.异常
原文地址:https://www.cnblogs.com/jpfss/p/11165527.html
时间: 2024-10-29 19:12:30