Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRUD controller includes documents which failed to update in results #387

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

paterczm
Copy link
Contributor

@paterczm paterczm commented Oct 2, 2017

This is to address on of the problems identified in lightblue-platform/lightblue-core#811

The constraints enforcement is a bit unclear to me.

For inserts and saves, constraints are enforced at the Mediator level. CRUD Controller allows insertion of a document with a null required field (there is even a test for that behavior: MongoCRUDControllerTest.insertTest_nullReqField).

For updates, this is enforced at the controller level, probably because we need a full document to check constraints, so it has to be read first. However, if constraints are not satisfied, crud controller indicates that only by setting the matchCount and modifiedCount fields accordingly. The status of the response is COMPLETE. I think it should be ERROR or PARTIAL and the failed documents should be included in the response, but I'm not sure I understand the intention behind all this.

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

Successfully merging this pull request may close these issues.

1 participant