Open NBA707 opened 11 months ago
Should I just do raw sql, or is there a way to set the primary key to be two fields in the model via public $primaryKey =
Laravel does support composite primary key afaik so you have to do saving manually like on your example. I think there are packages created for this purpose.
A quick search yields to https://github.com/thiagoprz/eloquent-composite-key. Maybe give it a try?
Summary of problem or feature request
I have a table that has 2 fields which are primary keys from different tables. It's primary key is unique compound partent tables fields. PK_TABLE3 - UNIQUE - COLUMNS: TABLE1_ID, TABLE2_ID When I do the ->save() it comes back with an error: Error Code : 904 Error Message : ORA-00904: "ID": invalid identifier Position : 91 Statemen
Code snippet of problem
System details