api « Property « JPA Q&A

1. Hibernate Criteria API - Filtering collection property    stackoverflow.com

I have such entity:

public class Album {

    private Integer id;
    private Integer ownerId;
    private String name;
    private String description;

2. Criteria API - Property.in()    forum.hibernate.org

Hi hibernate users! I am developing a multi-criteria search page (somethign like http://www.devx.com/Java/Article/28754/ ... portItem=1 ), and I use Hibernate's org.hibernate.Criteria class to construct the filtration. Now I need to do something like this: SELECT * FROM table1 JOIN table2 ON table1.col1=table2.col2 WHERE table2.colA='abc' AND 'abc' IN ( SELECT col3 FROM table3 WHERE .... ) Note that at the 'IN' clause, ...

3. Should Criteria API handle nested properties implicitly?    forum.hibernate.org

Correct me if I'm wrong, but currently, the Criteria API requires an alias or a subcriteria on an association in order to access an association's properties. So, given Person.class p, in order to access p.address.countryName as a projectionlist property address.countryName, it would be necessary to createAlias(address, "address") or createCriteria(Address.class, "address"). The typical use case is user-configured columns, where it's desirable to ...