projection « Component « JPA Q&A

1. hibernate - projection a component

I have a Address bean that have a LatLng component. Please tell me how can i project that component and transform it in to a new class. Thank you.

2. Criteria queries and projection of component properties

Hi, Using hibernate 3.2.5 GA I'm having the same problem, I cannot access components through in projections. I think it may have something to do with aliases not being propogated for components. I tried adding the line: criteria.createAlias("foo.baz", "baz"); where foo is my class and baz is my component and then in the projection I have projectionList.add("").as("bar")); When I execute the ...

3. Hibernate projection for component properties

Hi, I've tried to use hibernate's criteria query API to execute a query that defines a projection using a component property. I have List list = session.createCriteria(Person.class) .add("name", "%a%") ) .list(); where name is an attribute in Person class,This works fine.. But if i use a component , like, List list1 = session.createCriteria(Employee.class) .add("contactDetails", "%a%") ) .list(); The property ...