【发布时间】:2011-10-01 06:23:24
【问题描述】:
我想使用休眠条件限制子实体非关键字段来列出对象。
criteria.add(Restrictions.eq("template.orientation",orientation));
其中“template.orientation”是articleTemplate.template中的一个字段
当我尝试运行此程序时,会触发以下异常。
org.hibernate.QueryException:无法解析属性:com.media.web.bean.ArticleTemplate 的 template.orientation
你能帮帮我吗?
【问题讨论】:
-
请通过显示您的实体及其关系以及用于创建 Criteria 实例的代码来澄清。
-
也许 comrad 674714 也应该开始在他的一些答案中投票。
标签: java hibernate spring hibernate-mapping