Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!