title: Spring Data Neo4j MappingException: Field with primary id is null for entity
body: <p>I have a node entity class that is extending an abstract class which is in turn extending another abstract class as follows:</p>
  
  <pre><code>public abstract class AbstractModel{
      @Id
      @GeneratedValue(strategy = UuidStrategy.class)
      @Convert(UuidStringConverter.class)
      protected UUID uuid;
  }
  
  public abstract class AbstractBayModel extends AbstractModel{
       .....//more protected fields
  }
  
  public class Person extends AbstractBayModel{
      private String name;
      .//more code
      .
      .
  }
  
  @Service
  //Has a reference to a repository
  public class PersonService{
     public void add(Person person){
        repository.insert(person);
     }
  }
  </code></pre>
  
  <p>now when I invoke the service class's add() method, I am getting the following error.</p>
  
  <pre><code>org.neo4j.ogm.exception.core.MappingException: Field with primary id is null for entity model.Person@41a45331
  </code></pre>
  
  <p>I have tried to alter the service method as follows  and still get the same error:</p>
  
  <pre><code>public void add(Person person){
     person.setUuid(UUID.randomUUID();
     repository.insert(person);
  }
  </code></pre>
  
  <p>I am using the following  spring dependencies</p>
  
  <pre><code>    &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.2.2.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
     &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-neo4j&lt;/artifactId&gt;
     &lt;/dependency&gt;
  
  </code></pre>
  
  <p>Would be mighty obliged if anyone can assist.</p>
  
  <p>regards</p>
  
  <pre><code>
  
  </code></pre>