Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
<table class="A.B.C" table="item">
<id name="id" column="item_id">
<generator class="identity">
</id>
<many-to-one name="parent" column="parent_id" class="A.B.C">
</table>
As seen from the above mapping , "parent" property of the "A.B.C." class is pointing to "A.B.C" (to self) . In this case , when HQL query is fired for one "A.B.C",
whether hibernate tries to fetch all the "parent" objects until it gets null or
what is it's behaviour in this case ?
i.e. item_id prent_id
1
2 1
3 2
So here in this case will it fetch three "A.B.C" objects when HQL query
"from C obj1 where obj1.id = 1" is fired
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: