-
Notifications
You must be signed in to change notification settings - Fork 3.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
Support read-only property behaviors #7913
Labels
breaking-change
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
providers-beware
type-enhancement
Milestone
Comments
Design meeting notes:
|
ajcvickers
added a commit
that referenced
this issue
May 20, 2017
Part of issue #7913 This change obsoletes ReadOnlyBeforeSave, ReadOnlyAferSave, and StoreGeneratedAlways into two unified facets--one for before-save behavior (Added objects) and one for after-save behavior. In each case the property value can be: - Ignore: value never sent to database. (Equivalent to StoreGeneratedAlways, but can apply to any property and can be set differently for before and after save.) - Throw: any non-CLR default value set or property marked as modified causes exception. (Equivalent to previous read-only behaviors.) - UseValue: the value is used if it has been set (to non-CLR default for store-generated) or marked as modified. Also covers issue #7914 - makes Ignore the default for before and after save when using AddOrUpdate (computed) properties.
ajcvickers
added a commit
that referenced
this issue
May 20, 2017
Part of issue #7913 This change obsoletes ReadOnlyBeforeSave, ReadOnlyAferSave, and StoreGeneratedAlways into two unified facets--one for before-save behavior (Added objects) and one for after-save behavior. In each case the property value can be: - Ignore: value never sent to database. (Equivalent to StoreGeneratedAlways, but can apply to any property and can be set differently for before and after save.) - Throw: any non-CLR default value set or property marked as modified causes exception. (Equivalent to previous read-only behaviors.) - UseValue: the value is used if it has been set (to non-CLR default for store-generated) or marked as modified. Also covers issue #7914 - makes Ignore the default for before and after save when using AddOrUpdate (computed) properties.
ajcvickers
added a commit
that referenced
this issue
May 21, 2017
Second part of issue #7913 This change adds a new ValueGenerated option for requiring a value on insert, but then using the value from the store for subsequent updates. This is a binary breaking change, but not a functional breaking change after a re-compile.
ajcvickers
added a commit
that referenced
this issue
May 23, 2017
Part of issue #7913 This change obsoletes ReadOnlyBeforeSave, ReadOnlyAferSave, and StoreGeneratedAlways into two unified facets--one for before-save behavior (Added objects) and one for after-save behavior. In each case the property value can be: - Ignore: value never sent to database. (Equivalent to StoreGeneratedAlways, but can apply to any property and can be set differently for before and after save.) - Throw: any non-CLR default value set or property marked as modified causes exception. (Equivalent to previous read-only behaviors.) - UseValue: the value is used if it has been set (to non-CLR default for store-generated) or marked as modified. Also covers issue #7914 - makes Ignore the default for before and after save when using AddOrUpdate (computed) properties.
ajcvickers
added a commit
that referenced
this issue
May 23, 2017
Second part of issue #7913 This change adds a new ValueGenerated option for requiring a value on insert, but then using the value from the store for subsequent updates. This is a binary breaking change, but not a functional breaking change after a re-compile.
ajcvickers
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
May 24, 2017
25 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking-change
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
providers-beware
type-enhancement
Note: read-only entities is covered by issue #7586. This issue is about read/write entities with read-only properties.
The matrix of behaviors is covered by:
For throw scenarios:
For ignore scenarios with store-generated values
For ignore scenarios without store-generated values
Proposal:
No fluent API for now, but in the future consider adding it for most common combinations.
The text was updated successfully, but these errors were encountered: