title: Java Spring Neo4jRepository unable to read a property of abstract type
body: <p>I have just started experimenting with Neo4J/Java and expect this is an easy one I'm missing, and probably phrasing my queries wrong.</p>
  <p>I have some model classes as follows:</p>
  <pre><code>@Node
  public class Garment {
  
      @Id
      @GeneratedValue
      private Long id;
  
      private String name;
  
      @Relationship(type = &quot;DESIGNED_BY&quot;)
      private Entity designer;
  
      // Other properties getters/setters removed for readibility
  
      public Entity getDesigner() {
          return designer;
      }
  
      public void setDesigner(Entity designer) {
          this.designer = designer;
      }
  }
  
  public abstract class Entity {
  
      @Id
      @GeneratedValue
      Long id;
  
      private String name;
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  }
  
  @Node
  public class Person extends Entity {
  }
  
  @Node
  public class Company extends Entity {
  }
  
  </code></pre>
  <p>And a corresponding repository</p>
  <pre><code>public interface Garment extends Neo4jRepository&lt;Garment, Long&gt; {
  
      Garment findByName(String name);
  }
  </code></pre>
  <p>I have no problem inserting, using repository.save(), this correctly adds everything; nodes, relationships. Fine. It gives Designers of type Person labels of Person, and Designers of type Company the label Company.</p>
  <p>However, when I do a find, e.g. findByName(), findAll(). it is not matching the designer and just saying designer is null, according to the cipher being executed/logged it looks like it's trying to build a relationship there with nodes with an Entity label, which there are none.</p>
  <p><strong>How can I get my repository to return Garments with designers of Person and Companys. I expect this is going to be as simple as an annotation, in order to fix.</strong></p>
  <p>(Note I've tried adding a @Node on the entity type with Person and Company as labels, however it just results in every node being added as both a Person and a Company).</p>