title: Google App Engine Datanucleus enhencer
body: <p>I have following class as superclass </p>
  
  <pre><code>@Entity
  @MappedSuperclass
  public class Location implements LocationCapable {
  
      @Basic
      private Double latitude;
  
      @Basic
      private Double longitude;
  
      @Basic
      private List&lt;String&gt; geocells;
  
      @PrePersist
      @Transient
      private void generateGeoCells() {
          geocells = GeocellManager.generateGeoCell(getLocation());
      }
  
      public Double getLongitude() {
          return longitude;
      }
  
      public void setLongitude(Double longitude) {
          this.longitude = longitude;
      }
  
      public Double getLatitude() {
          return latitude;
      }
  
      public void setLatitude(Double latitude) {
          this.latitude = latitude;
      }
  
      @Override
      @Transient
      @JsonIgnore
      public Point getLocation() {
          return new Point(latitude, longitude);
      }
  
      @Override
      @Transient
      @JsonIgnore
      public String getKeyString() {
          return latitude + ":" + longitude;
      }
  
      @Override
      public List&lt;String&gt; getGeocells() {
          return geocells;
      }
  
      public void setGeocells(List&lt;String&gt; geocells) {
          this.geocells = geocells;
      }
  
  }
  </code></pre>
  
  <p>And another one which inherits from this</p>
  
  <p>But when I try to run JUnit test I got this</p>
  
  <pre><code>Caused by: org.datanucleus.metadata.InvalidMetaDataException: Class Location has application-identity and no objectid-class specified yet has 0 primary key fields. Unable to use SingleFieldIdentity.
  at org.datanucleus.metadata.AbstractClassMetaData.determineObjectIdClass(AbstractClassMetaData.java:1032)
  at org.datanucleus.metadata.ClassMetaData.populate(ClassMetaData.java:205)
  at org.datanucleus.metadata.AbstractClassMetaData.validateSuperClass(AbstractClassMetaData.java:720)
  at org.datanucleus.metadata.AbstractClassMetaData.determineSuperClassName(AbstractClassMetaData.java:642)
  at org.datanucleus.metadata.ClassMetaData.populate(ClassMetaData.java:193)
  at org.datanucleus.metadata.MetaDataManager$1.run(MetaDataManager.java:2317)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.datanucleus.metadata.MetaDataManager.populateAbstractClassMetaData(MetaDataManager.java:2311)
  at org.datanucleus.metadata.MetaDataManager.populateFileMetaData(MetaDataManager.java:2148)
  at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:864)
  at org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:794)
  at org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:488)
  at org.datanucleus.jpa.EntityManagerFactoryImpl.&lt;init&gt;(EntityManagerFactoryImpl.java:355)
  at org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.&lt;init&gt;(DatastoreEntityManagerFactory.java:63)
  at org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createEntityManagerFactory(DatastorePersistenceProvider.java:35)
  at javax.persistence.Persistence.createFactory(Persistence.java:172)
  ... 67 more
  </code></pre>
  
  <p>Also I've tried to add in supperclass the key field annotated with @Id but it gives no result for me</p>