1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc)
 

Recent Questions

!!! Hibernate Frequently Asked Questions !!!

Difference between session.load() and session.get()?

!!!Answer!!!- From Technical Expert

Cat fritz = (Cat) session.load(Cat.class, "1");

Return the Cat Object with key 1. If there is no Cat Object with key 1 then throw will throw an unrecoverable exception.

If the class is
mapped with a proxy, load() just returns an uninitialized proxy and does not actually hit the database until you
invoke a method of the proxy. This behaviour is very useful if you wish to create an association to an object
without actually loading it from the database. It also allows multiple instances to be loaded as a batch if batchsize
is defined for the class mapping.


Cat fritz = (Cat) session.get(Cat.class, "1");
If you are not certain that a matching row exists, you should use the get() method, which hits the database immediately
and returns null if there is no matching row.


Answered By : null Replied Date : Dec 5 2013
Answer :


Answered By : null Replied Date : Nov 24 2013
Answer :


Answered By : null Replied Date : Nov 1 2013
Answer :


Answered By : null Replied Date : Oct 22 2013
Answer :


Answered By : null Replied Date : Oct 21 2013
Answer :


Answered By : null Replied Date : Oct 13 2013
Answer :


Answered By : null Replied Date : Apr 28 2014
Answer :


Answered By : null Replied Date : Jun 6 2014
Answer :


Answered By : null Replied Date : Oct 19 2014
Answer :


Answered By : null Replied Date : Nov 3 2014
Answer :


Answered By : null Replied Date : Dec 21 2014
Answer :


Answered By : null Replied Date : Jul 12 2015
Answer :


Answered By : null Replied Date : Apr 10 2016
Answer :


Answered By : null Replied Date : Apr 20 2016
Answer :


Answered By : null Replied Date : May 29 2017
Answer :


Answered By : null Replied Date : Jun 26 2017
Answer :


 

You can also contribute to this answer:

Your Name:
Answer:

 
Ask Question and get answer from Expert.
View Answers List from Expert.

Reviews and Comments


PMP, CAPM, PMI is a registered certification mark of the Project Management Institute, Inc

Copyright © www.techfaq360.com 2016


About US | Contact US | Privacy Policy | Terms and Conditions  | Website disclaimer  | Cancellation and Refund Policy  | Shipping & Delivery Policy