Tag: technology

Questions Related to technology

  1. session..commit()

  2. session.getCommitTransaction()

  3. session.getTransaction().commit()

  4. session.getTransaction().save()


Correct Option: C
  1. Transient, persistent, destroyed

  2. Transient, stored, detached

  3. Transient, persistent, detached

  4. open, close, detached


Correct Option: C
  1. Pass an instance of java.util.Properties to Configuration.setProperties().

  2. Place hibernate.properties in a root directory of the classpath.

  3. Set System properties using java -Dproperty=value.

  4. All the above


Correct Option: D
  1. Hibernate does not support lazy initialization for detached objects.

  2. Access to a lazy association outside of the context of an open Hibernate session will result in an exception.

  3. Lazy fetching is way to avoid unnecessary column reads.

  4. All the above.


Correct Option: D
  1. sess.createQuery("SELECT * FROM CATS").list();

  2. sess.createSQLQuery("FROM CATS").list();

  3. sess.createSQLQuery("SELECT * FROM CATS").list();

  4. sess.createSQLQuery("from CATS", com.animals.Cat.class).list();


Correct Option: C