![]() Explain the benefit of version property in Hibernate? Provide the fetching strategies available in Hibernate?īatch Fetching, Sub-select Fetching, Join Fetching, and Select Fetching are the fetching strategies available in Hibernate.Ģ4. The default transaction factory with Hibernate 3.2 is JDBCTransactionFactory.Ģ3. In Hibernate, which is the default transaction factory? Make use of cache provider as “cache provider as ”Ģ2.To disable second level cache in Hibernate, you can perform any of the following: ![]() To disable second level cache in Hibernate, what are the different methods? Use the method “rge()” to attach the detached objects.Ģ1. In Hibernate, what is the method to reattach the detached objects? In Hibernate, you can use Criteria API, HQL, Standard SQL, and Identifier to fetch objects from database.Ģ0. What are the different methods to fetch objects from database in Hibernate? One-to-One Association and Many-to-Many Association are the two (2) mapping associations utilized in Hibernate.ġ9. Provide the mapping associations utilized in Hibernate? Medium Object Mapping, Pure Relational, Full Object Mapping and Light Object Mapping are the ORM levels available in Hibernate.ġ8. Provide the list of ORM levels available in Hibernate? Use the syntax “SessionFactory.getStatistics()” to retrieve the hibernate statistics.ġ7. What is the syntax to retrieve hibernate statistics? If the primary key is already existing in the table, this method will update the record.ġ6. The method saveOrUpdate() method is helpful in inserting a new record when the primary key is unique. If the primary key is already existing in the table, this method will not allow to insert. The method session.save() is used to save a record when it is unique with its related primary key. Also, you can have a simplified communication with hibernate session. Hibernate template is useful is automating the exception handling and session closing. List out the advantages of Hibernate template? Instead of Java classes, the usage of POJOs leads to a well-constructed and effective code.ġ3. These are java beans which has proper setter and getter methods for every property. No, the extension ‘.hbm.xml’ is not mandatory for all the hibernate mapping file as it is just a convention. Do you think the extension ‘.hbm.xml’ is mandatory for all the hibernate mapping file to work properly? The syntax to create criteria to the SQL query is “Session.createCriteria”. What is the syntax to add criteria to the SQL query? The syntax to create SQL query in Hibernate is “Session.createQuery”.ġ0. What is the syntax to create SQL query in Hibernate? What are the two (2) components available in Hibernate configuration object?Ĭlass Mapping Setup and Database Connection are the two (2) components of Hibernate configuration object.ĩ. HSQL, MySQL, FrontBase, Informix Dynamic Server, DB2, Sybase SQL Server, Oracle, and PostgreSQL are the Hibernate support databases.Ĩ. Provide the list of Hibernate support databases?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |