[hibernate-dev] 6.0 - id type

Steve Ebersole steve at hibernate.org
Mon Mar 27 13:37:01 EDT 2017


In all versions of Hibernate to-date we have required that the Java type of
an id be Serializable.  Strictly speaking JPA has no such restriction - it
says ids can be any Object type *unless* the entity is to be serialized, in
which case the id must be Serializable (duh).

As we transition into 6.0, I wonder if we want to loosen this restriction
and allow the id to be any Object type as well.  There really is no valid
reason (beyond the obvious case explicitly discussed in the JPA spec) for
requiring the id to be Serializable.

WDYT?


More information about the hibernate-dev mailing list