attribute « Component « JPA Q&A





1. prefix attribute of @hibernate.component tag not working    forum.hibernate.org

Hi, I am trying to generate hibernate mapping files and ddl using hibernatedoclet and hbm2ddl. I have a class with a component DateRange as an attribute which has two properties - start and end dates. The persistent class in question has two attributes of type DateRange - accessibleTime and . When I use the hibernatedoclet tag along with prefix option on ...

2. Querying attributes of components by criteria    forum.hibernate.org

Hi, I'm using Hibernate 3.1 I have a problem with searching attriutes of components with the criteria API. The class Annotation has a reference on the class Position. The class Position is mapped as a component of Annotation on the same table. When I query like this: Criteria lCrit = lSession.createCriteria(Annotation.class).createCriteria("position").add(Restrictions.like("x", "12")); I get the following exception: org.hibernate.QueryException: could not resolve ...