Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.05
hi everybody...
the question is:
i've a class A with e set o Classes B
in B there is a manytoone Class C.
I define manytoone of class C with fetch="join"
then with this code:
List list = criteria.createCriterial(A.class)
A a = (A)list.get(0)
session.createfilter(a.getListB(),"order by ...");
the sql genereted is:
1- query for all A like select * from a_table;
2- query for all B of A like select * from b_table join A_key
3- query for C of b like select * from c_table where c.key = btable.c
BUT I PUT FETCH="JOIN" in many-to-one of B
why hibernate generete this code??? i think with join C value must retrive by join and not by direct select
thanks.