0
Id generation in jpa
How to create id in a table using @GeneratedValue in jpa start with 1000 and increment by 50, and last Id value be 9950 like below: 1000 1050 1100 1150 ... ... ... 9950
1 ответ
0
@Entity
@SequenceGenerator(name="seq", initialValue=1, allocationSize=100)
public class EntityWithSequenceId {
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq")
@Id long id;
}