[hibernate-dev] 6.0 - id type

Steve Ebersole steve at hibernate.org
Tue Mar 28 08:33:13 EDT 2017


We've all "proposed" it at some point Sanne ;)  The bigger question is when
to do it since it means API changes.

But it sounds like everyone is on board for that for 6.0

On Tue, Mar 28, 2017, 6:54 AM Sanne Grinovero <sanne at hibernate.org> wrote:

> +1, as proposed a long time ago :)
>
> On 28 March 2017 at 07:52, Vlad Mihalcea <mihalcea.vlad at gmail.com> wrote:
> > +1
> >
> > I remember that Spring Data CRUDRepository has this restriction that ID
> > extends Serializable just because Hibernate required it so. I agree that
> we
> > should drop this restriction and allow non-Serializable @Id as other JPA
> > providers.
> >
> > On Mon, Mar 27, 2017 at 9:54 PM, Christian Beikov <
> > christian.beikov at gmail.com> wrote:
> >
> >> +1 for that. Stumbled over that once or twice in the past and wondered
> >> what the reasons were.
> >>
> >>
> >> Mit freundlichen Grüßen,
> >> ------------------------------------------------------------------------
> >> *Christian Beikov*
> >> Am 27.03.2017 um 19:37 schrieb Steve Ebersole:
> >> > 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
> >>
> >> _______________________________________________
> >> hibernate-dev mailing list
> >> hibernate-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >>
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> _______________________________________________
> 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