-
Sub-task
-
Resolution: Unresolved
-
Major
-
2.16.2.Final
-
None
It would be good to enable second level cache in an Entity. Something like adding an extra parameter to the jpa-new-entity command :
jpa-new-entity --named MyEntity --isCacheable
This would generate the following with the javax.persistence.Cacheable annotation :
@Cacheable @Entity public class Book implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", updatable = false, nullable = false) private Long id; @Version @Column(name = "version") private int version; // ... }