| We can already use a Map as a relationship but only with an Entity as value and a column or an embedded class as key. It is not uncommon to have a manytomany relationship featuring an association class inside the business model. Currently the most common fashion to map such a relationship is to create a new entity which embeds both sides of the relationship. A less common way is to use a map as an ElementCollection with the inverse side of the relationship as key. The latter is not compatible with cascaded operations and mappedBy attribute which prevents "boiler mapping". This improvement would save time for developers and avoid creating new classes. |