title: Ebean inheritance "Abstract class with no readMethod" exception
body: <p>I try to use inheritance with Ebean in Play! Framework 2.1.0. The inheritance strategy is &quot;single table&quot;, as it is the only one supported by Ebean. I closely follow example from <a href="http://en.wikibooks.org/wiki/Java_Persistence/Inheritance#Example_single_table_inheritance_annotations" rel="nofollow noreferrer">JPA Wikibook</a></p>
  <pre><code>@Entity
  @Inheritance
  @DiscriminatorColumn(name=&quot;price_type&quot;)
  @Table(name=&quot;prices&quot;)
  public abstract class Price {
      
      @Id
      public long id;
  
      // Price value
      @Column(precision=2, scale=18)
      public BigDecimal value;
  
  }
  
  
  @Entity
  @DiscriminatorValue(&quot;F&quot;)
  public class FixedPrice extends Price {
  
      // NO id field here        
      ...
  }
  
  @Entity
  @DiscriminatorValue(&quot;V&quot;)
  public class VariablePrice extends Price {
      
      // NO id field here
      ...
  }
  </code></pre>
  <p>This code passes compilation, but I get</p>
  <pre><code>RuntimeException: Abstract class with no readMethod for models.Price.id
  com.avaje.ebeaninternal.server.deploy.ReflectGetter.create(ReflectGetter.java:33)
  
   com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.setBeanReflect(BeanDescriptorManager.java:1353)
  
   com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.createByteCode(BeanDescriptorManager.java:1142)
  
   com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.readDeployAssociations(BeanDescriptorManager.java:1058)
  
   com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.readEntityDeploymentAssociations(BeanDescriptorManager.java:565)
  
   com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.deploy(BeanDescriptorManager.java:252)
  
   com.avaje.ebeaninternal.server.core.InternalConfiguration.&lt;init&gt;(InternalConfiguration.java:124)
      com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:210)
  
   com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:64)
  
   com.avaje.ebean.EbeanServerFactory.create(EbeanServerFactory.java:59)
  
   play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:79) 
  </code></pre>
  <p>Google search brings <a href="http://grepcode.com/file/repo1.maven.org/maven2/org.avaje/ebean/2.7.0/com/avaje/ebeaninternal/server/deploy/ReflectGetter.java" rel="nofollow noreferrer">only one relevant link</a> which is source code of ReflectGetter.java. The comment there says</p>
  <blockquote>
  <p>For abstract classes that hold the id property we need to use reflection to get the id values some times.</p>
  <p>This provides the BeanReflectGetter objects to do that.</p>
  </blockquote>
  <p>If I drop <code>abstract</code> keyword from superclass declaration, exception disappears. I would really prefer not to make superclass concrete though.</p>