Explain About Hibernate

Hibernate solves problems such as Object Relational impedance mismatch, etc. It is commonly used for object and query service. It helps data base developers develop classes which include inheritance, association, composition and polymorphism. A developer or user can express queries either in HQL or SQL Hibernate is a powerful and widely used object-relational mapping (ORM) … Read more

What is Lazy Loading In Hibernate

Lazy setting decides whether to load child objects while loading the Parent Object.You need to do this setting respective hibernate mapping file of the parent class.lazy = true (means not to load child)By default the lazy loading of the child objects is true. This make sure that the child objects are not loaded unless they are explicitly invoked … Read more

What is Lazy Fetching in Hibernate

Lazy setting decides whether to load child objects while loading the Parent Object.You need to do this setting respective hibernate mapping file of the parent class.Lazy = true (means not to load child)By default the lazy loading of the child objects is true. This make sure that the child objects are not loaded unless they … Read more

.What’s the Difference Between load() and get()

load() get() Only use the load() method if you are sure that the object exists. If you are not sure that the object exists, then use one of the get() methods load() method will throw an exception if the unique id is not found in the database. get() method will return null if the  unique id is not found in the database. load() just returns a … Read more

Write your own Strategy with Interceptor.isUnsaved()

When you reattach detached objects, you need to make sure that the dependent objects are reattached as well. It appears that you are asking about using an interceptor in the context of advanced Java programming, and specifically, you want to know about a strategy involving the Interceptor.isUnsaved() method. However, the provided information is not sufficient … Read more