java - Hibernate String Primary Key with Annotation -
I am trying to create a priority class with an annotation whose primary key is inserting the string, I will assign from Therefore there is no need for hibernate to generate value for it. I'm trying to do something like this:
@ id @ generatedValue (generator = "assigned") @ column (name = "ROLE_NAME", nullable = false) Private string role name ; but throws exceptions with:
by reason: org.hibernate.AnnotationException: unknown Id.generator: specified How do I configure a string primary key with annotations?
Since roleName is not auto-generated, @ generatedValue : "" ROLE_NAME ", nullable = false) Private string roles;
Comments
Post a Comment