Question
What is the difference between get() and load() methods of session object

Answers

There are following differences between get() and load() methods.

get() returns null if no data is present where as load throws ObjectNotFoundException exception in such case.
get() always hits the database whereas load() method doesn't hit the database.
get() returns actual object whereas load() returns proxy object.
A central feature of Hibernate, proxies, depends upon the persistent class being either non-final, or the implementation of an interface that declares all public methods.
All classes that do not extend or implement some specialized classes and interfaces required by the EJB framework.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What are the affinity laws associated with dynamics pumps?
  • Q What cities gothic cathedral started 1386 was completed 1805
  • Q What was a person called who prefurred ruling a kingdom rather than a group of elected officials? (A)President (B)Senate (C)Republicans (D)Emperor
  • Q Explain about interpolation?
  • Q Who said this “good citizen makes good state and bad citizen makes bad state”-
  • Q Who is Britain's longest serving consort?
  • Q Under what circumstances might you use the yield method of the Thread class 1) To call from the currently running thread to allow another thread of the same priority to run 2) To call on a waiting thread to allow it to run 3) To allow a thread of higher priority to run 4) To call from the currently running thread with a parameter designating which thread should be allowed to run
  • Q What is a san ?
  • Q How do i prevent errors when running t3dbping?
  • Q What is the accounts receivable turnover ratio?
  • Q What is routing in CodeIgniter?