Submitted by heartin on Tue, 04/12/2016 - 20:17
These are some of the commonly asked questions to check if you know the differences between important concepts or APIs in Hibernate. This may contain beginner to advanced level questions.
-
Differentiate between entities and value types in Hibernate.
-
What is the difference between save() and persist() methods in Hibernate?
-
What is the difference between get and load methods in hibernate?
Submitted by heartin on Tue, 04/12/2016 - 19:30
Before working with hibernate in your code, you will need to configure Hibernate with information regarding your database such as host, port, credentials etc. You also need to create mappings that tell hibernate how to map the state of a Java entity to the columns of its corresponding table.
We can configure various hibernate features either through annotations or through xml files (hbm files). Preferred approach currently is annotations.
You can configure Hibernate mainly in three ways:
Submitted by heartin on Mon, 04/11/2016 - 22:52
This is a list of basic questions from Hibernate which you can use to check your understanding or even prepare for interviews. You may use the parent chapter, other chapters or hibernate or the forum to discuss more on these questions.
-
What is a framework?
-
What do you mean by CRUD?
-
What is Hibernate? What are the advantages of using Hibernate?
-
What is Java Persistence API (JPA)?
Submitted by heartin on Sat, 11/28/2015 - 23:01
-
Find all pairs of integers within an array that sum to a specified value:
-
Given an M x N matrix, if an element is 0, its entire row and column in the matrix should be set to 0.
-
You are given a 2-Dimensional array (matrix) and a scale factor. You need to write a method to scale the 2D array according to the scale factor.
Submitted by heartin on Sat, 11/28/2015 - 21:33
-
Merge two sorted arrays A and B in sorted order. A has enough locations in the end to hold the elements of B.
-
No extra buffer should be used.
-
Every element should be shifted from its current position in A, at most 1 time.
-
Hint:
-
Sort an array of Strings. All anagrams should be next to each other.
Pages