could not execute query; SQL [select count(*) as col_0_0_ from order order0_]; nested exception is o
2017-05-13 21:55
405 查看
could not execute query; SQL [select count(*) as col_0_0_ from order order0_]; nested exception is o...
org.hibernate.exception.SQLGrammarException:…0.
在hibernate实体映射文件hbm/xml中加入表名
<class name="cn.mani123.domain.Order" table="order" catalog="phone">
<id name="orderno" column="orderno">
<generator class="native"></generator>
</id>
<property name="product_id" column="product_id"/>
<property name="account_id" column="account_id"/>
<property name="num" column="num"/>
</class>
org.hibernate.exception.SQLGrammarException:…0.
在hibernate实体映射文件hbm/xml中加入表名
<class name="cn.mani123.domain.Order" table="order" catalog="phone">
<id name="orderno" column="orderno">
<generator class="native"></generator>
</id>
<property name="product_id" column="product_id"/>
<property name="account_id" column="account_id"/>
<property name="num" column="num"/>
</class>
加入表名即可!
catalog="phone"
相关文章推荐
- nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
- org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exce
- [hibernate]:org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hi
- nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
- HTTP Status 500 - could not execute query; nested exception is org.hibernate.exception.JDBCConnectio
- SQLGrammarException :could not execute query a.user not exists解决
- org.hibernate.exception.SQLGrammarException: could not execute query
- org.hibernate.exception.SQLGrammarException: could not execute query
- Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Canno
- Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio
- Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNest
- nested exception is org.hibernate.QueryException: could not resolve property
- nested exception is org.hibernate.QueryException:could not resolve property:
- org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exceptio
- org.hibernate.exception.SQLGrammarException: could not execute query
- g.hibernate.hql.ast.QuerySyntaxException: tbl_base_count is not mapped [SELECT COUNT(*) FROM tbl_bas
- org.hibernate.exception.SQLGrammarException: could not execute query
- org.hibernate.exception.SQLGrammarException: could not execute query处理方式