111
Hibernate Mapping Map 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
Output
FetchTest.java
Output
Download
Next TopicOne to Many XML