[hibernate-dev] [OGM] When is AssociationKey serialized?

Sanne Grinovero sanne at hibernate.org
Mon Feb 3 09:21:53 EST 2014


On 3 February 2014 13:33, Emmanuel Bernard <emmanuel at hibernate.org> wrote:
> Hum, with the fact that this object now points to metadata, I wonder if
> we should force EhCache, Map and Infinispan to have their own version of
> EntityKey / RowKey and AssociationKey (or an appropriate externalizer).

Ok to consider it, but let's keep an eye on performance requirements:
allocating twice the objects which are strictly necessary is probably
not going to help.
Maybe if these where interfaces, each GridDialect could make his own type ?

Sanne

>
> Emmanuel
>
> On Mon 2014-02-03 11:56, Gunnar Morling wrote:
>> Hi,
>>
>> I'm wondering why org.hibernate.ogm.grid.AssociationKey implements
>> Serializable. When is it actually serialized?
>>
>> I'm suspecting the answer is "never", as the type of the "metadata" member
>> is not serializable, so I'd expect a NotSerializableException to be raised.
>>
>> If so, does anything speak against making AssociationKey not implement
>> Serializable?
>>
>> Thanks,
>>
>> --Gunnar
>> _______________________________________________
>> 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