Get vs Load method in Hibernate - Interview Question

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Get vs Load method in Hibernate - Interview Question

Both get and load method are used to retrieve object in hibernate but there are subtle difference between them which can affect performance if used at
http://javarevisited.blogspot.com/2012/07/hibernate-get-and-load-difference-interview-ques...
  • Total Hits: 19824

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 155 votes

  • Category: JAVA/Frameworks

  • Submitted on: 2012-12-24 15:30:16

  • Submitted By: Javin Paul

  • Set as Favorite

Description:

Both get and load method are used to retrieve object in hibernate but there are subtle difference between them which can affect performance if used at wrong place. Like get() never return uninitialized object and always hit DB if object is not found in cache but same time it return null if object doesn't exist which can be used to make decisions.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 36.13%  56
 Two starsTwo star  Vote LeftVote MiddleVote Right 9.68%  15
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 12.26%  19
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 12.26%  19
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 29.68%  46

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements