• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to avoid lazy="false"

 
stshiva raaj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Team, My existing developers are set lazy="false" and worked lot. Now I am facing performance issue. It is fetching all child objects. Without changing my existing hbm files Is there any way to avoid lazy="false".
 
Hauke Ingmar Schmidt
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand that. If you use hbm files for configuration then that is the place to do it. You need to change it there.

I guess some of the developers used eager fetching because it avoids session management. Yes, you will probably face some work in fixing this. But there is no real work around.

If your objects work in a "normal" use case and the eager fetching produces performance issues only in certain cases (e.g. report generating) you can either use SQL in parallel (Hibernate is not a complete replacement) or you can create lightweight objects that work on the same data; probably best if they are read only and are tailored to exactly the data you need.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic