i have 2000 record in my DB . after inserting a new record the sequnce start from 1 instead of 2001. In my hibernate POJO i have this following
@Id
@SequenceGenerator(name = "SEQ_USER_MASTER_ID", sequenceName = "SEQ_USER_MASTER_ID", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_USER_MASTER_ID")
private Long id;
what i need to do in hibernate java to automatically start from 2001 or what ever the max id in table . the sequence should start greater than it . i am struck on this .