As far as I know, one of the main advantages of hibernate is, precisely, the fact that you don't have to specify the join columns in queries, because, in theory, they were already specified, only once, in the mapping file.
If the join you want to achieve is uncommon or can't be expressed in the mapping file, what you can do is specify the join in the "WHERE ..." clause, as if it were another where condition. In the Hibernate documentation they call this kind of join a "theta join".
In other words, if you have 2 tables
Code:
Table A
column ID_A
Table B
column ID_B
column REF_A
and, for some reason, the relationship between A and B is not specified in your map file,you can always write
Code:
select A, B where b.refA=a.idA
Gonzalo Díaz