Collections Mappings:
If an entity or class has collection of values for a particular variable, then we can map those values using any one of the collection interfaces available in java. Hibernate can persist instances of java.util.Map, java.util.Set, java.util.SortedMap, java.util.SortedSet, java.util.List, and any array of persistent entities or values.
| Collection type | Mapping and Description |
|---|---|
| java.util.Set | This is mapped with a |
| java.util.SortedSet | This is mapped with a |
| java.util.List | This is mapped with a
|
| java.util.Collection | This is mapped with a |
| java.util.Map | This is mapped with a |
| java.util.SortedMap | This is mapped with a |