How does one implement an autoincrementing int as PK? #47
Unanswered
iron3oxide
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The documentation only shows UUID as PK type, I would prefer to use an int, as shown in this example app. The implementation shown there doesn't work for me though as it leads to every record being assigned the ID 1. When declaring it as optional though (so an ID doesn't have to be specified when creating an instance of the model), the database complains that ID is null when it shouldn't be. What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions