Closed beikov closed 2 months ago
This was intentional, not an oversight. I don't think it makes any sense to use a time or timestamp as a map key.
For similar reasons to why it doesn't make sense to use Float
or Double
—these are all fundamentally approximate types.
i.e. map keys should always be discrete types: enums, string, integers, etc.
I guess that's also why you deprecated the MapKeyTemporal
annotation? I don't have a strong opinion, and I understand that mapping temporals as map key is probably not very common, but I don't see a fundamental problem. Temporals are exact, not like approximate numerics. Anyway, I don't want to start a discussion. Merely wanted to point out this situation because of a Hibernate ORM 7 exception caused by the lack of this member.
I guess that's also why you deprecated the
MapKeyTemporal
annotation?
No, that's because we also deprecated @Temporal
. Use of java.sql
types is deprecated in JPA 3.2.
Column
received a new membersecondPrecision
, but apparently it was forgotten onMapKeyColumn
. Would be nice to align that and also in the XML.