I would like to do using hibernate criteria and createAlias a query like this:
SELECTtable1."any_field"
FROM
table1 inner join table2 on table1.field1 = table2.field1 OR table1.field2 = table2.field1
where .....
The main problem is I'm not able to add "OR" condition to the inner join, all restrictions and stuff I apply always becomes "AND".