org.hibernate.QueryException: could not resolve property
2013-01-30 15:35
495 查看
org.hibernate.QueryException: could not resolve property: applicationTemplate of: com.yuxuan.model.Application [from com.yuxuan.model.Application a where a.user = ? and a.applicationTemplate = ?]
hbm.xml设置问题,当时<many-to-one name="ApplicationTemplate"
column="applicationTemplateId"/>
而实体类里面的属性是
private ApplicationTemplate applicationTemplate;
public ApplicationTemplate getApplicationTemplate() {
return applicationTemplate;
}
public void setApplicationTemplate(ApplicationTemplate applicationTemplate) {
this.applicationTemplate = applicationTemplate;
}
name="ApplicationTemplate"
应该把a小写,并加上class
即
<many-to-one name="applicationTemplate"
column="applicationTemplateId" class="ApplicationTemplate"/>
注意hbm.xml和实体类属性一致(包括大小写)!
hbm.xml设置问题,当时<many-to-one name="ApplicationTemplate"
column="applicationTemplateId"/>
而实体类里面的属性是
private ApplicationTemplate applicationTemplate;
public ApplicationTemplate getApplicationTemplate() {
return applicationTemplate;
}
public void setApplicationTemplate(ApplicationTemplate applicationTemplate) {
this.applicationTemplate = applicationTemplate;
}
name="ApplicationTemplate"
应该把a小写,并加上class
即
<many-to-one name="applicationTemplate"
column="applicationTemplateId" class="ApplicationTemplate"/>
注意hbm.xml和实体类属性一致(包括大小写)!
相关文章推荐
- nested exception is org.hibernate.QueryException: could not resolve property
- 数据库异常整理:org.hibernate.QueryException: could not resolve property: “xxx”
- org.hibernate.QueryException: could not resolve property错误的解决方法
- Struts Problem Report:org.hibernate.QueryException: could not resolve property: ?? of: com.zyc.xxx
- 异常org.hibernate.QueryException: could not resolve property的原因
- org.hibernate.QueryException: could not resolve property
- org.hibernate.QueryException: could not resolve property 错误解析
- 出现“org.hibernate.QueryException: could not resolve property”错误的解决
- 数据库异常整理:org.hibernate.QueryException: could not resolve property: “xxx”
- org.hibernate.QueryException: could not resolve property:
- 数据库异常整理:org.hibernate.QueryException: could not resolve property: “xxx”
- org.hibernate.QueryException: could not resolve property:xxxxxid 外键查询 hibernate
- org.hibernate.QueryException: could not resolve property
- org.hibernate.QueryException: could not resolve property:
- 异常解决—org.hibernate.QueryException: could not resolve property: “xxx”
- Hibernate-org.hibernate.QueryException: could not resolve property: code of:
- Caused by: org.hibernate.QueryException: could not resolve property
- nested exception is org.hibernate.QueryException:could not resolve property:
- org.hibernate.QueryException: could not resolve property: address of:
- 常见Hibernate报错处理:出现“org.hibernate.QueryException: could not resolve property”和 is not mapped和could not locate named parameter错误的解决