As a general note I find it rather unexpected that there is not even a warning about this. Is Envers completely unaware of this annotation?
For this particular annotation, that's correct. Envers was aware of @MapKey but just didn't have native support for [{@MapKeyEnumerated}} unfortunately. In fact, there are still several annotations and mapping configurations that Envers just cannot yet support for several reasons. Some of them are because the integration between ORM and Envers is based on HBM and there isn't always a direct correlation between some of the newer JPA specification features and HBM. This is certainly a focal of mine throughout the Envers 6.x release stream. Many of those which aren't yet supported have open feature requests such as @Where, @WhereJoinTable, @Sort and its derivatives, and @Index. |