Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
DDC-298: Allow Entity to hold a collection of a single primitive type #3743
Jira issue originally created by user @beberlei:
Sometimes you want to save arbitrary information for an entity using a key -> value array-structure. JPA supports this by means of the @elementcollection annotation with allows to specify HashMaps for example.
I propose a new AssocationMapping called "ElementMapping" / "ElementCollection" and annotations (options):
The key and value definitions are necessary for converting and schema generation.
The implementation would make use of the PersistentCollection at all times and work as any other persistent collection just with primitive types.
Restrictions for a first implementation:
This could be done for 2.0 imho, adding the necessary changes and optimizations could then be scheduled for 2.1