WRT (1) I do agree with you in theory. But hopefully you can see why we'd rather not condone nor implement checking serial data byte-by-byte for equality . I understand about wanting to stick to JPA, but registering a JavaTypeDescriptor is not something your application code would do. You'd have a JDK-style service (as in java.util.ServiceLoader for TypeContributor and Hibernate would pick that up automatically. Nothing non-JPA-y about that from your applications PoV. Regardless I am expanding the log message there to be actually 2 distinct messages:
- A DEBUG message saying that the fallback is being used.
- if the Java type does not implement equals/hashCode a warning will be logged
|