Tag: web technology

Questions Related to web technology

  1. session..commit()

  2. session.getCommitTransaction()

  3. session.getTransaction().commit()

  4. session.getTransaction().save()


Correct Option: C
  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
  1. Every table must have a separate mapping file

  2. Only parent table needs separate mapping fie

  3. Only child table need separate mapping file

  4. One mapping file can have mappings for one or more table.


Correct Option: D
  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. integer

  2. character

  3. yes_no

  4. None of the above


Correct Option: D
  1. Using several dialect

  2. Using several

  3. Using several connection properties

  4. Not possible to map more than one database


Correct Option: B