-
Notifications
You must be signed in to change notification settings - Fork 404
Closed
Description
| Q | A |
|---|---|
| Bug? | yes |
| New Feature? | no |
| Framework | Laravel |
| Framework version | 6.x.y |
| Package version | 9.x.y |
| PHP version | 7.3.y |
Actual Behaviour
When updating a pivot table without an id column it throws an error that the auditable_id cannot be null
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'auditable_id' cannot be null
Expected Behaviour
Insert without auditable_id for pivot tables
Steps to Reproduce
calling $model->relationship()->updateExistingPivot($relationship_id, $data) in a controller throws the error SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'auditable_id' cannot be null
Possible Solutions
Update migration to nullableMorphs('auditable') however this results in null values being recorded for old_values. Needs to record old_values through relationship instead of by pivot id
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels