• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Biggest Hibernate mistake?

 
paul nisset
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you see as the biggest mistake people make when using Hibernate ?
 
srinivas guruzu
author
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would have to say proper utilization of hibernate (may be not a mistake). I think the association mappings are done all the time, but when it comes to inheritance mapping, it is not fully used. So is fetching complete entities all the time when only certain scalar values are required. Of course this is from my experience.

Regards

Srinivas
 
paul nisset
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Fred Muhlenberg
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

So is fetching complete entities all the time when only certain scalar values are required.


Being a novice with Hibernate, what do you do to address this?
Do you create abridged classes that contain only your pertinent values?

-Fred
 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fred Muhlenberg wrote:
So is fetching complete entities all the time when only certain scalar values are required.


Being a novice with Hibernate, what do you do to address this?
Do you create abridged classes that contain only your pertinent values?

-Fred


We can acheive this by using SQL query to get a list of scalars instead of generic "select * from"

More on this topic is here.
 
Fred Muhlenberg
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An interesting technique. I never knew.

 
Jay Kang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the tip, this is a cool topic~
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic