Thanks for your reply. I tried to do the HQL join, but was not sure how to set it up.
This is the query I am interested in doing:
Code:
select *
from g, t
where g.tid = t.id
and t.id = 6
Here is my HQL query try:
[code]
net.sf.hibernate.Criteria criteria = session.
createCriteria(G.class).
setFetchMode("t", FetchMode.LAZY).
add(net.sf.hibernate.expression.Expression.eq("id", new Long(6)));
java.util.List c = criteria.list();
[code]
And I do not have anything specific in G.hbm.xml and T.hbm.xml mapping files that would refer to this one-to-many relationship or foreign key constraint.
Any hints/help on how to fix this HQL join would be appreciated.