6 Replies Latest reply on Jun 7, 2013 3:51 AM by agoncal

    MappedSuperclass and inheritance in JPA


      Hi all,


      I was wondering if it was possible to create MappedSuperclass with Forge and having entities extending thoses MappedSuperclasses. I couldn't find anything about JPA inheritance in general and nothing with MappedSuperclass nor Embeddeables. Is there a way ?


      As a new comer in Forge (I had a look a the very first versions long time ago) I feel the commands are not that intuitive. I love the following :


      java new-enum-type

      java new-itnerface

      java new-class



      So I would expect to have something similar in JPA :

      persistence new-entity (instead of entity --named)

      persistence new-embedable

      persistence new-mapped-superclass


      Inheritance could just be an argument :


      persistence new-mapped-superclass --named Person

      persistence new-entity --named Vet --extends Person


      Coming back to the command line, the following would make sense, don't you think ?

      ejb new-stateless

      ejb new-singleton

      servlet new-filter

      rest new-endpoint



      My 2 cents