Multiple choice technology web technology

How can the mapping files be configured in Hibernate?

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

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

  3. both a and b

  4. none of the above

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

Hibernate supports BOTH configuration methods: programmatically adding mapping files via Configuration.addResource() or configuring them in hibernate.cfg.xml using elements. Both approaches are valid.