XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Major Major
    • 3.x Future
    • 2.16.2.Final
    • Java EE
    • 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;
        // ...
      }
      

            Unassigned Unassigned
            agoncal Antonio Goncalves (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: