Does hibernate allow mixing table-per-class hierarchy and table-per-subclass strategies?
Yes
No
can't say
None of the above
Which statement is correct ?
Session.contains() method to determine if an instance belongs to the session cache
Session.contains() method to determine if an instance belongs to the data base
Both are correct
What does session.evict() method do ?
Remove the object and its collections from the first level cache
Remove the object and its collections from the second level cache
Remove the object and its collections from the data base
Is the Session threadsafe in Hibernate ?
True
False
No matter
How can you make a property be read from the database but not modified in anyway
By using the insert="false" and update="false" attributes.
By using the isinsert="false" and isupdate="false" attributes
By using the isinsert="no" and isupdate="no" attributes.
None
A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed
A Session will obtain a JDBC Connection (or a Datasource) on object create
A Session has no relation with JDBC Connection (or a Datasource)
How to enable query cache in hibernate
Hibernate.cache.query_cache true
Hibernate.cache.use_query_cache true
Hibernate.cache.query_cache yes
If you are not certain that a matching row exists in the database then which method is the best ?
Session.load();
Session.get();
Session.fetch();
Which statement is correct?
Bag has index column
Bag permits duplicate element values
Bag does not permits duplicate element values
What does session.createQuery("Query").scroll() return ?
ListResultSet
ResultSet
ScrollableResultSet
ScrollableResult