[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Hibernate loads all entities on manager.merge()

murtuza52 do-not-reply at jboss.com
Fri Dec 22 06:50:40 EST 2006


Current setup:
JBoss 4.0.5, MySQL 5.0, Windows XP SP2

The application we have developed has about 50 entities with inheritence. Each entity is mapped to a table and most OneToMany and ManyToMany relations are LAZY fetched except for few where application requires them to be EAGER fetched. Some of the entities have about 50,000 records and i have noticed in the logs that when manager.merge() is called on any entity, Hibernate load every entity from the database in memory before performing update. What surprises me is it even loads entities that are LAZY fected and even those that have absolutely no relation with current entity being merged. Can even help me to turn off this entities loading? I am sure hibernate is very flexible and there must be some tag or configuration where we can switch this off.

Thanks
Murtuza Vohra

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995843#3995843

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995843



More information about the jboss-user mailing list