views:

27

answers:

1

my entity class is annotated with @Cache, my primary keys are combined of few table fields, primary keys are embedded into this class as embedded class. Do I need to put @Cache for the embedded class as well?

+1  A: 

No, the @Cache annotation goes on entities and on collections. Your composite key will be used as key for the cache entry.

Pascal Thivent