PUT Rest API request for hasMany Relationship #740
Replies: 4 comments 3 replies
-
Hey @iasisalomon — no, you don't need to It looks to me like your backend is expecting the Did you recently add the |
Beta Was this translation helpful? Give feedback.
-
This is the standings side of it, the relation is one to many. Will try today restarting the process. Just leaving this here because maybe I am misundestanding the relationship field. |
Beta Was this translation helpful? Give feedback.
-
We did make a change recently that might have to do with a cache problem. When starting Payload, webpack is using the node_modules/.cache/webpack directory to save off your build for watching. You could try to delete the directory to see if that makes a difference. Other than that you should be able to follow the documentation to know how the different relationship options change the shape of the data: Let us know how it goes! |
Beta Was this translation helpful? Give feedback.
-
Only way I could make it work:
|
Beta Was this translation helpful? Give feedback.
-
Model
When i try the following PUT request, the request succeeds to edit the information of the relations IDS
it pops an internal server error 500.
Do i need to PUT the whole object instead of only the ids?? is there a better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions