Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Key converter support with ElementCollection

While working on the ElementCollection support, I noticed there is no way in JPA to specify or support a converter for a key column in a basic map mapping case.
 
Note, JPA doesn't have any explicit support of converters with ElementCollection but we certainly could add some since internally EclipseLink supports them. As it is a @Convert (or a JPA converter, @Lob, @Temporal, @Enumerated) could be applied to the value column of a direct collection or direct map mapping case, but there is no way to specify a converter for the map key.
 
Perhaps we could introduce another annotation? KeyConverter? MapKeyConverter? MapKeyColumnConverter?
 
In the interim, if users wanted a way to have a key converter they could either use EclipseLink's @BasicMap or a customizer to add the converter.
 
Anyway, food for thought over the holidays.
 
Cheers,
Guy
 
 

Back to the top