|
Some thoughts on this:
-
As a user, I would expect Hibernate to choose correctness over performance, and the default case to be "it just works". AttributeConverter's API doc says nothing about mutability, so as a user I'd expect that it can be mutable. Therefor the default case should be "mutable" (especially if else there are hard to track down errors).
-
The AttributeConverter I choose to use may not be under my control, e.g. because I want to reuse code from a third party library. I would like to have multiple ways to specify mutability:
-
If I write the AttributeConverter myself, I can implement a special interface or annotate it
-
If I use a third party attribute converter, I'd like to be able to configure mutability in the Hibernate Config
|