Skip to main content

Posts

Showing posts with the label core java interview question

Hibernate interview questions

Question : Why JPA Entity or Hibernate Persistence Class Should Not be Final?  Answer : One of the interesting hibernate interview questions is, why you should not make a Hibernate persistent class final? I'll try to answer this question in this short blog post. The use of proxies is the core feature of Hibernate (one of the most popular ORM frameworks for Java Projects) for implementing key performance features e.g. lazy loading and lazy associations fetching. In order to use a proxy in place of a real class, your hibernate persistence class must be either non-final or the implementation of an interface that declares all of the public methods. Difference between save vs persist and saveOrUpdate in Hibernate Save vs. saveOrUpdate vs. persist in Hibernate? What is the difference between save and saveOrUpdate or Difference between saving and persist are common interview question in any Hibernate interview, much like the difference between get and load method in Hibernate. Hibern