title: Hibernate String Primary Key with Annotation
body: <p>I am trying to create a Privilege class with Annotations whose Primary Key is a String. I will assign them manually while inserting. Therefore no need for hibernate to generate a value for it. I'm trying to do something like that:</p>
  
  <pre><code>@Id
  @GeneratedValue(generator = "assigned")
  @Column(name = "ROLE_NAME", nullable = false)
  private String roleName;
  </code></pre>
  
  <p>But it throws that exception:</p>
  
  <pre><code>Caused by: org.hibernate.AnnotationException: Unknown Id.generator: assigned
  </code></pre>
  
  <p>How can I configure a <code>String</code> primary key with annotations?</p>