Answer the question
In order to leave comments, you need to log in
Why is @Id needed in Entity?
Why is the @Id field needed in Entity? What happens if I have a field with @Id, but there is no column with the field name?
Answer the question
In order to leave comments, you need to log in
1) Maybe in JPA?
2) Consider this example:
@Entity
@Table(name="users")
public class UsersDataSet {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
long user_id;
//...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question