I believe the spec actually just says that the composite key class must be serializable if the model is to be serialized (duh). I could be misremembering, but I believe that is right.
The spec does not say anything about the serializability of simple keys because the spec severely limits id types (which are inherently serializable). For the most part, this is our requirement. On Wed, Jul 6, 2016 at 4:10 PM Gunnar Morling <gun...@hibernate.org> wrote: > Serializability of composite key types is mandated by the JPA spec, but I > suppose it's fine to be less strict in our implementation. Out of interest, > does anyone know why that requirement is part of the spec? > > 2016-07-06 22:19 GMT+02:00 Sanne Grinovero <sa...@hibernate.org>: > > > Tracked now as: > > - https://hibernate.atlassian.net/browse/HHH-10935 > > > > Thank you all! > > > > On 6 July 2016 at 17:49, Emmanuel Bernard <emman...@hibernate.org> > wrote: > > > +1, one less people will complain about :) > > > > > > On Tue 2016-07-05 17:28, Steve Ebersole wrote: > > >> I'm ok with this. That is no longer a real requirement. > > >> > > >> Any disagree? > > >> > > >> On Tue, Jul 5, 2016, 11:58 AM Sanne Grinovero <sa...@hibernate.org> > > wrote: > > >> > > >> > Hi all, > > >> > today creating a unit test I was greeted by this "old friend": > > >> > > > >> > > org.hibernate.MappingException: Composite-id class must implement > > >> > Serializable: > > >> > > > >> > shall we get rid of this requirement? > > >> > > > >> > It's just an inconvenience for end users to have to remember this > > >> > marker, as far as I know we don't really need this anymore. > > >> > > > >> > I realise some code might still be needing this, but we probably can > > >> > do better by not actually serializing it with the default platform > > >> > serializer? > > >> > > > >> > Just an idea for a potential 6.0 improvement.. > > >> > > > >> > Thanks, > > >> > Sanne > > >> > _______________________________________________ > > >> > hibernate-dev mailing list > > >> > hibernate-dev@lists.jboss.org > > >> > https://lists.jboss.org/mailman/listinfo/hibernate-dev > > >> > > > >> _______________________________________________ > > >> hibernate-dev mailing list > > >> hibernate-dev@lists.jboss.org > > >> https://lists.jboss.org/mailman/listinfo/hibernate-dev > > _______________________________________________ > > hibernate-dev mailing list > > hibernate-dev@lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/hibernate-dev > > > _______________________________________________ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev