Javatpoint Logo
Javatpoint Logo

Mapping Map in collection mapping using xml file

Hibernate allows you to map Map elements with the RDBMS. As we know, list and map are index-based collections. In case of map, index column works as the key and element column works as the value.

Example of Mapping Map in collection mapping using xml file

You need to create following pages for mapping map elements.

  • Question.java
  • question.hbm.xml
  • hibernate.cfg.xml
  • StoreTest.java
  • FetchTest.java

Question.java

question.hbm.xml

hibernate.cfg.xml
StoreTest.java

FetchTest.java




Please Share

facebook twitter google plus pinterest tumbler

Learn Latest Tutorials