I'd like to have a column for member numbers which are unique. What's the best way to do this with Hibernate/JPA?
What's the best way to generate a unique integer combination of, say, 10 digits, that can be used as a member number?
EDIT
@Generated(GenerationTime.INSERT)
@Column(insertable = false)
private int membernumber;