how to set fetch type at run time in hibernate 3.2?
session.beginTransaction();
Customer customer = session.get(getCustomerId());
session.save(customer);
session.commit();
if any possibility to change fetch type(“lazy/eager”) at run time. so,is there any impact when already defined a fetch mode i.e.,”select/join” in hibernate.mapping file?.If any wrong with question sorry.
You can use
join fetchto specify a specific collection to initialize.e.g.
See more here
Or you can use the criteria API