hibernate中出现错误org.hibernate.hql.PARSER]
本帖最后由 dxy860812 于 2013-12-22 15:06:50 编辑
hql = "from Member as member where member.memberId=:memberID";
query = session.createQuery(hql);
该Member 类为:
public class Member implements java.io.Serializable {
private String
memberId;
private String fatherId;
private String sunId;
private String region;
private String passwoed1;
private String passwoed2;
private String memberName;
private String identity;
为什么运行到 hql = "from Member as member where member.memberId=:memberID";
query = session.createQuery(hql);
就出现ERROR [org.hibernate.hql.PARSER] - line 1:36: unexpected token: member错误
------解决方案--------------------memberID??
------解决方案--------------------把as去掉试试效果
------解决方案--------------------你要把参数赋值啊。