Skip to content

Incorrect value (0) for custom primary keys without auto-increment #3251

Answered by thetutlage
Gredys asked this question in Help
Discussion options

You must be logged in to vote

Since you are self assigning the primary key in the application codebse. You need to use this property to notify Lucid https://docs.adonisjs.com/reference/orm/base-model#static-selfassignprimarykey

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Gredys
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants