title: JPA entity without id
body: <p>I have a database with the following structure:</p>
  
  <pre><code>CREATE TABLE entity (
      id SERIAL,
      name VARCHAR(255),
      PRIMARY KEY (id)
  );
  
  CREATE TABLE entity_property (
      entity_id SERIAL,
      name VARCHAR(255),
      value TEXT
  );
  </code></pre>
  
  <p>When I try to create an EntityProperty class</p>
  
  <pre><code>@Entity
  @Table(name="entity_property")
  public class EntityProperty {
  
      private String name;
      private String value;
  
      @Column(name="name")
      public String getName() {
          return name;
      }
      public void setName(String name) {
          this.name = name;
      }
  
      @Column(name="value", nullable=true, length=255)
      public String getValue() {
          return value;
      }
      public void setValue(String value) {
          this.value = value;
      }
  }
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <pre><code>org.hibernate.AnnotationException: No identifier specified for entity: package.EntityProperty
  </code></pre>
  
  <p>I know that JPA entities must have a primary key but I can't change the database schema due to reasons that are beyond my control. Is it possible to create JPA (Hibernate) entities that will work with database schema like this? </p>