Setup:
I did create a table in PostgreSQL, with a column id serial Primary Key. Looking at the properties of the column in pgAdmin I can see:
Datatype: Integer
Default: nextval('items_id_seq'::regclass)
(So if I'm not mistaking i did create it using the 'serial' key-word.)
Now in my backend-code I'm using the method: jpaRepository.deleteAllInBatch(), which 'truncates' my whole table.
Problem
When after this call I do add records to the table again, i can see that the id of the following record continues from the id of the last record I had in the table.
Question:
Is there a way to reinitialize the id-serial when doing the jpaRepository.deleteAllInBatch() so that records begin with id = 0 again?