I have a table A which contains a collection of table B (one-to-many from A to B). Now in my mapping file for A, I specify lazy="true". After I load the A into an object, I want to retrieve all the B s associated with A. So I have to call (A)getHibernateTemplate().get(A.class, id) to retrieve an object of A for a specific id, but at this point, how do I retrieve all the Bs? The hibernate session is closed now. I don't want to write another query to retrieve Bs for A's id. How do I call A's getter method to retrieve all the Bs? Thanks for the help.
Announcement Announcement Module
No announcement yet.