posted 14 years ago
I am working on hibernate fetching strategies but unable to get the difference. I do not know where I am doing a mistake. I am using MySQL5.0 as DB.
I have an Author class and a Books class. The relationship is One to many. I query the books and retrieve the author one by one but I am not able to see the select query for each author for each book from the list obtained after executing the query. This is the default fetching strategy but I am not able to see the query but able to print the properties of the author.
I have added the following two properties in the hibernate.cfg.xml. Are there any other property which needs to be added for sql logging apart from the below.
I am hereby attaching the code for more details.
Books.hbm file
Author .hbm file
In the client code
Thanks and Regards, Pradeep Kumar
SCJP 1.6, SCWCD 5.0