Hi All,
Currently, I have an application that have it's own cache. I want to start some designing to move it to Hibernate and use EHCache instead of the custom one. Here is my current set up
The User object have Sets such as roles, loans, notes, and etc.
1. loans (lazy="true")
2. notes (lazy="true")
this way if they administrator is listing all the user, we don't want to load everything up.
Now from the user list, the administrator is selecting a specific user. Now I want to load the user and initialize the loans and notes before I close the session.
1. hibSession.load(User.class, key);
2. What can I use to inititialize loans and notes Set with one call? I know I can just do the good old getLoans() and getNotes() call but with if there were many of those. That is why the question above.
The application above are mostly load and view of items (5000+ objects) and users (5000+ objects). Does it save much if I put them in the cache permanently (no expire time) or just do the query each time? I would assume the earlier is pobably the way.
Regards,
JavaLamer
|