My code retrieves all information related to the user:
SessionFactory sessionFactory = HibernateUtilities.configureSessionFactory();
Session session = sessionFac
userAddress = ud.getAddresses();
session.getTransaction().commit();
for(Address addr: userAddress) {
The hibernate documentation for working with lazy associations clearly calls out this kind of access as an error. You can interact with lazily associated objects only while the session is still open. That portion of the documentation also provides alternatives to access such lazily associated members of an object and we prefer to specify the fetch mode as JOIN in the criteria used, in our applications.