[hibernate-dev] Caching @EmbeddedId/@Embeddable instances
Galder Zamarreño
galder at redhat.com
Fri Jun 8 07:26:10 EDT 2012
Hi all,
Re: https://community.jboss.org/message/739399#739399
This guy's using a combo of @EmbeddedId and @Embeddable in the tests his provided, and this is resulting in cache key serialized payloads differing for identical instances. Even in between runs, the last bit of the payload varies. This obviously results in keys not being found in the cache.
Apart from this issue which I'm currently investigating, I've spotted that when the CacheKey is marshalled, it also marshalls the entity as part of the key. That sounds rather inefficient, so is this guy:
a) using the right pattenr for @EmbeddedId + @Embeddable
b) is Hibernate behaving the right way here by having a reference to the entity from cache key
Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
More information about the hibernate-dev
mailing list