In spring data jpa Application I created one model with @entity annotation. I am saving that model data into table. I am auto incrementing primary key. But when I am saving data into table it's not sequentially auto incrementing.
@GeneratedValue(strategy = GenerationType.AUTO)
class file
@Entity
@Table(name="exception")
public class Exception implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO, generator = "exception_seq_generator")
@SequenceGenerator(name = "exception_seq_generator", sequenceName = "exception_seq")
@Column(name="exception_id")
public Integer exceptionId;
@Column(name="status_code")
public Integer statusCode;
public String message;
public String status;
public String error;
//Getter and setter
Table
can any one tell me why primary key is not auto incrementing sequentially? why it's not taking 2,3,4.....