Thread: Hibernate Interview Question
Joined: 25 Jul, 2018
Hibernate Interview Question
1.) Difference between load() vs get() method?
2.) Difference between save() vs persist() method?
3.) Difference between update() vs merge()?
4.) Difference between hibernate vs JDBC?
5.) Difference between Session vs SessionFactory object?
6.) Is Session object is threadsafe?
7.) Is SessionFactory is threadsafe if yes then how?
8.) Hibernate domain object all states?
9.) Hibernate is throwing HibernateException so it is checked or unchecked?
10.) When u get the following error?
11.) What is HQL? in HQL is it directly possible to work with insert query?
12..) In hibernate is it possible to work with procedure or function?
13.) Do u know about (n+1) select problem?
14.) Tell me some strategy to solve (n+1) select problem?
15.) How many caches in hibernate? can u tell me differences between these caches? is they are automatically configured or we have to explicitly do some configuration?
16.) Did u work with Criteria API in hibernate and in which situation we should go for it?
17.) What is difference between getCurrentSession() and openSession() in Hibernate?
18.) How do you log SQL queries issued by the Hibernate framework in Java application?
19.) What is the use of dialect in hibernate?
20.) How many types of mapping u know in hibernate?
21.) What is Component, Inheritance mapping and what is annotation we use for both these mapping?
22.) What is association mapping in hibernate? how many types of association mapping possible in hibernate?
23.)What is the use of cascade attribute in hibernate?
24.) What is an orphan record in hibernate?
25.) As u know there are 4 persistence ioperation(Create, Update, delete, insert) we use in hibernate so tell me which persistence operation is not generally used and with reason also?
26.) Tell me about many to many and one to one mapping and which annotation we use for one-to-one association mapping?
27.) Which annotation u use to define the foreign key column in hibernate?
28.) Which design pattern u observed in hibernate?
29.) Write hibernate configuration and mapping file code?
30.) Which object represents a connection object from database in hibernate?
31.) Which object shows connection pool in hibernate?
32.) Did u use properties file in hibernate if yes then tell me the use case?
33.) What is the use of hibernate.properties file?
34.) What is lock in hibernate? what is the difference between an optimistic vs pessimistic lock?
35.) What is the use of Object versioning in hibernate?
36.) What is use of timestamp in hibernate?
37.) How u deal with images in hibernate?
38.) Did u know about the hibernateFilter concept in hibernate?
39.) In hibernate how u deal with Transaction management?
40.) Tell me what is main drawback of hibernate?
41.) What is the mean of Synchronization?
42.) Where u used Singleton design pattern in hibernate?
43.) What is online application and offline application and in which type of application we should use for hibernate and tell me the reason also?
44.) How u enable second level cache in hibernate?
45.) Which is default connection provider in hibernate? and what is the issue to work with that?
46.) In standalone application which type of connection pool u used in hibernate?
47.) In web application which type of connection pool u used in hibernate?
48.) What is proxool connection pool in hibernate?
49.) Write sample code for for association mapping so be prepare for writing sample code for all type of mappings also?
50.) What is use of inverse attribute in hibernate with it's usage?
51.) When we save parent in hibernate then it's child class also saved in database or not ?
52.) When u delete any object in hibernate so what happens actually is really object is deleted?
Post has been marked as Answered
Post has been marked as Un-Answered
Do you want to Report as spam?
Report a thread
Successfully marked as spam.
Tell A Friend
Successfully send the mail to Friends!!
Successfully you refer to your Friends for this Thread