Skip to content
This repository was archived by the owner on Mar 18, 2021. It is now read-only.

Allow lists to be included in input JSON, but ignore when trying to i… #25

Merged
merged 1 commit into from
Dec 9, 2015

Conversation

itsjoeconway
Copy link
Contributor

…nsert/update to adapter.

I hit this on the wrong branch, so naming is incorrect. Basically, you can now POST/PUT model objects with ModelControllers that have a body that contains hasMany related objects. AKA, I have a User that has a List of Location. The JSON body can contain "locations" : [{"locationID" : 1}]. This will be appropriately parsed into the requestModel object and can be used in the endpoint. However, it should be noted that the (intended) behavior is that trying to insert the 'User' object in this example will NOT insert the embedded Location objects. That would cause all kinds of nightmares.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants