hibernate Objective Questions and Answers (SET - 1)

Please attempt at least 12 objective questions to see test result.

1)  What does the Session object hold?

2)  Which ways are used by the Log4j and Logback frameworks in hibernate framework to support logging?

3)  In case of Table per Concrete class, there will be three tables in the database having no relations to each other. Which are the ways to map the table?

4)  Which of these simplifies an Object Relational Mapping tool?

5)  What is dirty checking in Hibernate?

6)  Which of the following is the root level element in a hibernate mapping file?

7)  what does addScalar() method does in the below code ? Double max = (Double) sess.createSQLQuery("select max(cat.weight) as maxWeight from cats cat") .addScalar("maxWeight", Hibernate.DOUBLE); .uniqueResult();

8)  What is dirty checking in Hibernate?

9)  What does session.evict() method do?

10)  Which statement is correct?

11)  what does hibernate.hbm2ddl.auto create this means?

12)  Is Hibernate Session threadsafe?

13)  How can you make a property be read from the database but not modified in anyway?

14)  which 2nd level cache is better in hibernate?

15)  In the elements of Hibernate architecture is a factory of session and client of ConnectionProvider,It holds second level cache (optional) of data?

Is this page helpful to you? Please give us your feedback below. We would love to hear your thoughts on these articles, it will help us improve further our learning process.