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

Updates should only validate updated fields #758

Open
bserdar opened this issue Jan 24, 2017 · 1 comment
Open

Updates should only validate updated fields #758

bserdar opened this issue Jan 24, 2017 · 1 comment

Comments

@bserdar
Copy link
Contributor

bserdar commented Jan 24, 2017

If you're updating a field, and if there is a different field in metadata that is currently null in the updated doc but is required, then update fails. For instance, you update some unrelated field, but it complains that, say, updatedDate is null, because it is added to the metadata as required, but this document doesn't have it.

So, only validate those fields that were updated during an update.

Note that this would still fail for save, because that is saving an invalid document, and it should fail.

@jewzaam
Copy link
Member

jewzaam commented Jan 25, 2017

+1

But what if the field without data has identity constraint? Meaning, the metadata has changed since the record was created to make a new field "identity" and older documents may not have it because either the field didn't exist before or the field wasn't required before. I think in general we don't want to see this happen. But we don't enforce any versioning policies such as not allowing a non-major version to make changes that are not backwards compatible. This is what is happening in some of our 0.0.x entity versions. We're just making changes and coordinating the impact for the most part (missed this in one case though, hence this issue!).

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

No branches or pull requests

2 participants