Hi All,
I have a question about lazy loading...
I have the following relationship
1 Book has 0..* Reviews.
Scenario is
User searches for books. And then clicks on the book of interest. The system should display all the Reviews for the books.
I am using JPA and I have modelled my Book class to have a List<Review> objects.
I have annotated Reviews as a lazy load.
Now when user searches for books, I use a named query for searching the books. As per my understanding of lazy load, the reviews will not be loaded.
Now these Book entities are serialized and passed to the presentation tier and displayed using
jsp. Once the user clicks the book of interest I want to load the reviews for the book.
Will the reviews be loaded if I refer the member ? or Do i have to use the EM to get the reviews using named queries ?
Thanks
Ashwin