Composite primary key inside model #1871
Unanswered
subhamcodes
asked this question in
Help
Replies: 1 comment
-
Hello @subhamcodes Composite primary keys are not yet supported by Lucid. This is something I have to work on, but need to do some initial research too. For now, performing manual select and create/update is the only option |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have a table with composite primary keys which i have defined in the migrations file as follows.
table.primary(['field1', 'field2'], 'constraint_name')
Now i want to use Lucid models and inside the model file, I need to define the primary key for the table.
How to do this? As i want to use updateOrCreateMany method so I need to mention unique key.
Beta Was this translation helpful? Give feedback.
All reactions