pb00067 wrote:
Quote:
it's important on the use of updatetimestamps region supported?
Only if you declare the NaturalId
mutable the updatetimestamps region will be envolved
in determinating if a cached result set (2nd-level-query-cache) is still valid.
In case of a immutable NaturalId a cached result set is always considered valid.
Quote:
Are you forced to use xml config files to use this feature in 3.6.10?
No.
P.S.: NaturalId-support was fundamentally refactored and enhanced in hibernate 4.1,
so if you want really take benefit of the NaturalId feature, then it's worth to migrate to that version.
How when using JPA can you denote something is immutable because when you debug it does not make the determination that it's using an immutable natural id.
only if I use Criteria is it convinced that Natural Id applies.
I didn't find anywhere in the code where it picks up the annotation and uses it when the query is specified. IF you use JPQL is there anything more you have to do?
In criteria I'm using add(Restrictions.naturalId() ....
Am I allowed to put @NaturalId on a getter? That's what I have at the moment but it doesn't seem to work.