你知道不 实体类的名称一定一定一定要和数据库中表的名字一致!

2011年9月27日 上午10:22:39 org.apache.catalina.core.StandardWrapperValve invoke 嚴重的: Servlet.service() for servlet test threw exception org.hibernate.hql.ast.QuerySyntaxException: country is not mapped [from country] at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:181) at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:111) at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:93) at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:314) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3355) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3239) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:726) at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577) at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:294)


哦这个是血的教训,白白的浪费了那么多时间,

楸的我眼疼


你可能感兴趣的:(你知道不 实体类的名称一定一定一定要和数据库中表的名字一致!)