Multiple choice technology programming languages

How can the mapping files be configured in Hibernate?

  1. a) Mapping files can be added to Configuration in the application code

  2. b) They can be configured in hibernate.cfg.xml using the <mapping> elements

  3. c) both a and b

  4. d) none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Hibernate mapping files can be configured both programmatically via Configuration.addMapping() and declaratively via hibernate.cfg.xml using elements. Both methods are valid and commonly used depending on the setup preference.