I have a question using Hibernate Criteria, I need to convert this query using criteria.
SELECT * FROM A a_ INNER JOIN B b_ ON a_.column1=b_.column1 AND b_.column2 IN (X,Y) AND active='Y';
I need the result as table A.
If the associations are defined, see http://docs.jboss.org/hibernate/core/3.3/reference/en/html/querycriteria.html#querycriteria-associations
In case associations are not specified in the entities definition, you can't use criteria. You can use HQL to do inner joins (need to write in implicit join notation), for doing left joins you have to use native SQL.