-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
updateAll should honour strict mode #3183
Comments
@bajtos will this be backported to v.2? |
Should it be? I labelled this issue as a feature (semver-minor), which means it won't be backported. What's your opinion? |
I'd prefer to see it backported, because to me it doesn't appear like a feature. The semantics of An option like that (with a name that implies a serious restriction) should behave as expected at all times, to avoid the issues (even security related) mentioned, wouldn't you agree? |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
Bug/Feature request
See #742 (comment)
When user makes a
POST /update
request (callsupdateAll
in node API terms), the backend will happily persist (yes, actually persist, not just a wrong in-memory representation) random properties to MongoDB through anupdateAll
even though strict mode is enabled for the model.Expected result
updateAll
honoursstrict
mode and rejects request with extra properties not described by the model.Additional information
The scope of this issue is to fix
strict
mode only. Enforcing all property validations is covered by loopbackio/loopback-datasource-juggler#771.The text was updated successfully, but these errors were encountered: