Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18565

Default generated entity is invalid

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.30.x
    • None
    • hibernate, upstream
    • None

      Code for a default generated JPA entity looks like:

      package org.svcc;

      import java.io.Serializable;
      import javax.persistence.*;

      /**

      • Entity implementation class for Entity: Student
        *
        */
        @Entity

      public class Student implements Serializable {

      private static final long serialVersionUID = 1L;

      public Student()

      { super(); }

      }

      This is an invalid entity because each JPA entity must have a primary key.

      For a simpler OOTB experience, generate a default primary key.

            kaers@redhat.com Koen Aers
            arungupta_jira Arun Gupta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: