-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eloquent cannot save models with composite primary keys #6245
Comments
The issue is relative to issue #5248 |
This issue is well known. Eloquent doesn't support composite primary keys. |
Its works!!! Ex: //--------- Model "Table2": ------------// Now the Eloquent undestand that you have a 'table_relashionship' in your database with columns 'id_table1' and 'id_table2' and you can access the data with the comand: Its solve my problem! |
Added working models with repo and complete unit tests
When defining composite primary keys then calling save on an instanced model, an exception is thrown.
And here's the declaration of Model
Here's the code to create new record in Controller class.
The text was updated successfully, but these errors were encountered: