title: JPA Entity from Hibernate to EclipseLink
body: <p>Sorry for my English</p>
  
  <p>I have some problems with mapping entity in EclipseLink JPA. 
  I have some entity: </p>
  
  <pre><code>@Entity
  @Table(name = "TSENSOR")
  @Cacheable
  public class Sensor extends Model implements Serializable {
      @EmbeddedId
      SensorIdentifier key;
      @Column(name = "CDESCRIPTION", columnDefinition = "TEXT")
      String description;
      @Column(name = "CTYPE")
      @Enumerated(EnumType.STRING)
      SensorType type;
  
      ...
  
  }
  
  
  @Embeddable
  public class SensorIdentifier extends DeviceIdentifier {
      @Column(name = "PNUM")
      byte num;
  
      ...
  
  }
  
  @Embeddable
  @MappedSuperclass
  public class DeviceIdentifier extends Model implements Serializable {
      @Column(name = "PSYSTEM", insertable = false, updatable = false)
      String systemName;
      @Column(name="PDEVICEID")
      int id;
      @Column(name="PDEVICESUBID")
      short subId;
  
      ...
  
  }
  </code></pre>
  
  <p>On server-side this entity mapped in Hibernate JPA and work excelent. But on client i need mapped this entity in EclipseLink JPA (I work with Eclipse RCP 4.x and Gemini DI), and i had this exception: </p>
  
  <blockquote>
    <p>Exception [EclipseLink-46] (Eclipse Persistence Services -
    2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException Exception
    Description: There should be one non-read-only mapping defined for the
    primary key field [TSENSOR.PSYSTEM]. Descriptor:
    RelationalDescriptor(watchdog.core.client.model.Sensor -->
    [DatabaseTable(TSENSOR)])</p>
  </blockquote>
  
  <p>This problem only with entity contains EmbeddedId</p>