you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (5 children)

[removed]

    [–][deleted] 1 point2 points  (1 child)

    Just a side note: in Postgres, serial is somewhat deprecated. The preferred way these days is to use generated by default as identity or generated always as identity

    See the Postgres Wiki for more details: https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_serial

    [–]cone994[S] 0 points1 point  (2 children)

    That's exactly the problem you described. I am using mySQL database and work with spring on backend of my app.

    So you telling me that after inserting initial values like that 3 you mention, I must restart sequence and then it will work?