Get vs Load method in Hibernate - Interview Question

Tutorials Shared by the Internet Community

Advertisements


Synopsis

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

Statistics

  • Total Hits - 23917

  • Total Votes - 126 votes

  • Vote Up - 62 votes

  • Vote Down - 64 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Frameworks

  • Submitted By - Javin Paul

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

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. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements