Re: [hibernate-dev] natural-id to primary key cache

2012-03-06 Thread Eric Dalquist
This has been completed and made it into the 4.1 release. There are two parts, a persistence context level cache of PK->NaturalId and NaturalId->PK and a new NaturalIdCacheRegion was added to the caching SPI. The Ehcache provider that ships with Hibernate was updated to support the new region a

Re: [hibernate-dev] natural-id to primary key cache

2012-03-06 Thread Alex Snaps
This has been a recurring subject in the ehcache forum and a source of misunderstanding by many. Having the second level cache support these as "first class citizen" makes total sense to me. Is there some draft of how this would look like ? Would this be a mapping of natural id to primary key ? Sor

[hibernate-dev] natural-id to primary key cache

2012-01-20 Thread Steve Ebersole
Historically natural-id look ups were accomplished by leveraging Criteria queries. Caching was handled through the second level query cache. One of the new things in 4.1 is the dedicated natural-id loading API. So the caching will be quite different here. I am a little leery about making a b