Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to prevent lazy initialization on a proxy

 
Didier Varon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have two entities (EntityA, EntityB), linked this way:



In my process I load a EntityB by getting proxies as follows:


Then I create an EnittyA



I do this for thousands of records, and when I persist those EntityA objects, Hibernate tries to initialize the proxies, I can see hibernate logging
Hibernate: /* load com.somecompany.bean.EnitityB */


Is there any way to let hibernate know that I don't want those proxies to be initialized?

Many thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic