@Data
@Entity
public class Question {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
private Integer id;
private String questionTitle;
private String option1;
private String option2;
}
this is my dao.
every time when i post new data the id value is wrongly generated in postgresql.
I tried to delete the table. even also the table start with id not in sequence
I want the id to look in sequential order
New contributor
Muhammed Jafer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.