[hibernate-dev] 6.0 - id type

andrea boriero andrea at hibernate.org
Mon Mar 27 14:14:50 EDT 2017


+1 for removing the Serializable restriction

On 27 March 2017 at 18:37, Steve Ebersole <steve at hibernate.org> wrote:

> 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?
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list