Hi,
I have 2 tables Authors and Books. In my hibernate mapping file of Authors, I have a property called "books" which is by default lazy. Now I want to create a criteria such that it returns me list of authors with early fetch on books and some restriction on the books. I mean, return me a list of authors with their list of books(I want this to be early fetched) where bookId = "someId" (The bookId column is on the Books table)
Also, I know that I can say early fetch in the "books" property in the Authors hbm file. But I dont want to this common for all of my calls. I want to specify early fetch in my criteria not in my hbm file.
Could anyone tell me how to do this?
Thank you
|