There is a table with the following structure: (primary keys: user_id, record_id)
+---------+-----------+-------+
| user_id | record_id | value |
+---------+-----------+-------+
| 1 | 1 | 100 |
| 1 | 2 | 200 |
| 2 | 1 | 300 |
| 2 | 2 | 400 |
+---------+-----------+-------+
When i change value parameter over eloquent-query in my Controller like this:
$playerRecord = Test::where('user_id', '=', $player_id)->where('record_id', '=', '1')->first();
$playerRecord->value = $user_value1;
$playerRecord->save();
I have an error: https://flareapp.io/share/47qg8ZEm#F49
If I define only one primary key in the model, all records with this key are updated, despite the fact that I forced to update a specific record.