How to get SessoionFactory from configuration object (config) ?
config.createSessionFactory()
config.getSessionFactory()
config.buildSessionFactory()
config. SessionFactory.newInstance()
Which of the following association needs tag element in mapping file?
One to one
One to many
Many to one
None of the above
Which is not a basic value type in hibernate?
integer
character
yes_no
If you intend to put instances of persistent classes in a Set, you have to
Override equals() method
Override hashCode() method
Both a and b
Neither a nor b
Which is the function call ensure that SQL statement is executed?
commit()
flush()
close()
list()
What is property name for printing all the executed SQL statements?
echo_sql
show_sql
print_sql
display_sql
Which of the following must be satisfied by a component class?
Implements java.io.Serializable
Both a, b and c
How to add ordering phrase in hibernate criteria?
criteria.setOrder( Order.asc("name") )
criteria.add( Order.asc("name") )
criteria.addOrder( Order.asc("name") )
criteria.addOrder( "name asc" )
What should be done to change the actual database system type (say, from DB2 to MySql)?
connection.driver_class property should be changed
connection.url property should be changed
dialect property should be changed
All the above
How can we map several databases in hibernate?
Using several dialect
Using several
Using several connection properties
Not possible to map more than one database