title: Spring Data neo4j - Id generation strategies
body: <p>I'm working on an example project in which I have a model class <code>Movie</code> and I want this movie to have a <code>UUID</code> as the identifier. 
  I tried the following code. </p>
  
  <pre><code>import java.util.ArrayList;
   import java.util.Collection;
   import java.util.List; 
  
  import com.fasterxml.jackson.annotation.JsonIdentityInfo;
  import com.fasterxml.jackson.annotation.ObjectIdGenerators;
  import org.hibernate.annotations.GenericGenerator;
  import org.neo4j.ogm.annotation.GraphId;
  import org.neo4j.ogm.annotation.NodeEntity;
  import org.neo4j.ogm.annotation.Relationship;
  import org.springframework.data.annotation.Id;
  
  import javax.persistence.GeneratedValue;
  @JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="id")
  @NodeEntity
  public class Movie {
  
  @Id @GeneratedValue(generator = "uuid")
  @GenericGenerator(name="uuid", strategy="uuid2")
  private String id;
  
  
  private String title;
  
  private int released;
  
  private String tagline;
  
  @Relationship(type = "ACTED_IN", direction = Relationship.INCOMING)
  private List&lt;Role&gt; roles = new ArrayList&lt;&gt;();
  
  public Movie() {
  }
  
  public Movie(String title, int released, String tagline) {
  
      this.title = title;
      this.released = released;
      this.tagline = tagline;
  }
  
  public String getId() {
      return id;
  }
  
  public void setId(String id) {
      this.id = id;
  }
  
  public String getTitle() {
      return title;
  }
  
  public int getReleased() {
      return released;
  }
  
  public String getTagline() {
      return tagline;
  }
  
  public Collection&lt;Role&gt; getRoles() {
      return roles;
  }
  
  
  public void addRole(Role role) {
      this.roles.add(role);
  }
  }
  </code></pre>
  
  <p>This code is generating an error. </p>
  
  <p><code>org.neo4j.ogm.exception.MappingException: No identity field found for class: movies.spring.data.neo4j.domain.Movie</code></p>
  
  <p><a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference:annotating-entities:graph-id" rel="nofollow noreferrer">here</a> is the reference I used to write this code 
  I am using <code>neo4j-ogm-core:2.1.3</code>
  I didn't understand what was in the reference fully. 
  but I needed to import <code>Hibernate</code> to use <code>@GenericGenerator</code></p>
  
  <p><strong>Question:</strong></p>
  
  <p>How can I use UUID inside my model. knowing that I'm using <code>Spring Data</code>?</p>
  
  <p><em>Note</em>: I am new to <code>Neo4j</code> and <code>Spring</code>. I am having difficulties asking the proper questions. </p>