Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Philippe Desrosiers
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic