开发者

Criteria listing query with restriction on sub entity non primary key issue

I want to use hibernate criteria with restriction on sub entity non key field for listing objects.

criteria.add(Restrictions.eq("template.orientation", orientation));

where "template.orientation" is a field in articleTemplate.template

when I am trying to run this the following exception fired.

org.hibernate.QueryException: could not resolve property: template.orientation of: com.media.web.bean.Ar开发者_StackOverflowticleTemplate

can you help me?


Do you have the getters and setters in ArticleTemplate? ie: template.getOrientation() and template.setOrientation(Orientation)?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜