8000 Adding existing many to many relationship with incrementing pivot · Issue #580 · cloudcreativity/laravel-json-api · GitHub
[go: up one dir, main page]

Skip to content
Adding existing many to many relationship with incrementing pivot #580
Closed
@bbprojectnet

Description

@bbprojectnet

Hi,

When i try to add again same relation to many-to-many relationship, the relation is not added - it's ok.

But, in the same case, when i have pivot model with $incrementing = true, it works weird. For first record in pivot table is works as excpected, duplicates are not added, but for any other record (ID != 1) they are - what causes the error if we have unique constraint in database for related columns.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0