My cache usage on entity Foo looked like this
@Entity
class Foo {
@ManyToOne(fetch = LAZY)
@Cache(usage = org.hibernate.annotations.CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Boo boo;
@OneToMany
@Cache(usage = org.hibernate.annotations.CacheConcurrencyStrategy.READ_WRITE)
private List<Bar> bars;
}
How should I migrate this code to support JPA 2 like annotations using Hibernate 3.6.5
I am aware that we are supposed to use @Cacheable
annotation at the entity level, but what should I use for cache declarations under
@ManyToOne and @OneToMany.