Hi,
Code:
select * from table_a a
left outer join table_b b on b.pk_column_id=a.pk_column_id
where a.column_x='criteria'
to do this I know we can add a code like this in Criteria Queries
Code:
Criteria criteria = daoService.getCriteria(TableA.class);
criteria.createAlias("TableB", "TableB", CriteriaSpecification.LEFT_JOIN);
I would like to
Code:
select * from table_a a
left outer join table_b b on b.pk_column_id=a.pk_column_id and b.column_y='val1' and b.column_z='val2'
where a.column_x='val'
Notice the ON clause with
and b.column_y='val1' and b.column_z='val2'I don't want to add those criteria in where clause. I would like to do it only in the ON clause. How would I achieve this in Hibernate criteria queries.
Thanks in advance for your help.