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

Drawback of having large number of <many-to-one> in hibernate mapping file

 
Tapan Maru
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there any drawback of having large number of <many-to-one> in hibernate mapping file? if yes, whats that drawback?

Thanks in Advance,

Tapan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None that I can think of (it does suggest your underlying data model might have one entity representing too much, but that is a differernt story). Anything in particular you were worried about?
 
Tapan Maru
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the prompt reply..

I am worried only because hibernate loads the objects (POJO) so will it not affect memory management and will degrade the performance in case of a large J2EE application?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I follow, what are you worried about Hibernate loading? Assuming you define lazy associations Hibernate will only load the associated objects if you need it to.
 
Tapan Maru
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.. thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic