You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an issue where if I create a resource with multiple relationships attached via a polymorphic pivot table, then only one of the models are attached. Furthermore, it looks like the ID increments oddly, leading me to suspect that the controller is detaching attributes (updating all related as if a PATCH request).
Context
I have an odd data structure where there are groups, users, and polymorphic pivot table "membership."
(MorphedToMany/MorphedByMany, the inverted scenario of polymorphic-to-many)
I'm running into an issue where if I create a resource with multiple relationships attached via a polymorphic pivot table, then only one of the models are attached. Furthermore, it looks like the ID increments oddly, leading me to suspect that the controller is detaching attributes (updating all related as if a PATCH request).
Context
I have an odd data structure where there are groups, users, and polymorphic pivot table "membership."
(MorphedToMany/MorphedByMany, the inverted scenario of polymorphic-to-many)
Groups have the following in the schema
Groups have the following in the request
The Issue
Here is where things get odd, if I send the following in a POST request:
Then then the following will happen in the database:
My hypothesis
I think what is happening here is that instead of adding a member and an owner, the controller is:
The text was updated successfully, but these errors were encountered: