This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes How can I get hbm2hbmxml to set lazy= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How can I get hbm2hbmxml to set lazy="true"?" Watch "How can I get hbm2hbmxml to set lazy="true"?" New topic
Author

How can I get hbm2hbmxml to set lazy="true"?

Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
Somewhere, somehow, there is an option called "default-lazy". I know this because I've seen it mentioned in the Hibernate code generation templates (specifically hibernate-mapping.hbm.ftl). How can I specify this option when running the hbm2hbmxml ANT task?

ALSO: If I specify lazy = true for ALL my entity classes, is there some way to prevent hibernate from entering an infinite loop when it encounters a linking table? I'm configuring hibernate using Spring HibernateDaoSupport, etc. Is this what the hibernate.max_fetch_depth option is for?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can I get hbm2hbmxml to set lazy="true"?