Details

    • Sub-task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 2.16.2.Final
    • 3.x Future
    • Java EE
    • None

    Description

      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;
        // ...
      }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: