-
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
Add support for default value conventions #9329
Labels
area-conventions
area-model-building
consider-for-current-release
punted-for-6.0
punted-for-7.0
Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints.
type-enhancement
Milestone
Comments
AndriySvyryd
changed the title
Move TableNameFromDbSetConvention to RelationalModelCustomizer
Add support for default value conventions
Jan 11, 2018
24 tasks
This was referenced Mar 12, 2020
This was referenced Aug 10, 2020
73 tasks
This was referenced Nov 15, 2021
maumar
added a commit
that referenced
this issue
Jan 20, 2022
…when DefaultSchema is configured at the DbContext Level Problem was a discrepancy between RelationalModel build in runtime and the current model (from OnModelCreating) - relational model would set history table schema annotation using the table schema or default schema, however current model wouldn't set those annotations. Model differ would then pick up on those differences and create migration to set the schema for history table. When building actual migration sql we already compensated for the difference and not generate actual sql code, but the problem persists. Fix is to add missing default annotations in the model finalization step. This is a temporary measure until we implement default value conventions (#9329) Fixes #26676
maumar
added a commit
that referenced
this issue
Jan 20, 2022
…when DefaultSchema is configured at the DbContext Level Problem was a discrepancy between RelationalModel build in runtime and the current model (from OnModelCreating) - relational model would set history table schema annotation using the table schema or default schema, however current model wouldn't set those annotations. Model differ would then pick up on those differences and create migration to set the schema for history table. When building actual migration sql we already compensated for the difference and not generate actual sql code, but the problem persists. Fix is to add missing default annotations in the model finalization step. This is a temporary measure until we implement default value conventions (#9329) Fixes #26676
maumar
added a commit
that referenced
this issue
Jan 20, 2022
…when DefaultSchema is configured at the DbContext Level Problem was a discrepancy between RelationalModel build in runtime and the current model (from OnModelCreating) - relational model would set history table schema annotation using the table schema or default schema, however current model wouldn't set those annotations. Model differ would then pick up on those differences and create migration to set the schema for history table. When building actual migration sql we already compensated for the difference and not generate actual sql code, but the problem persists. Fix is to add missing default annotations in the model finalization step. This is a temporary measure until we implement default value conventions (#9329) Fixes #26676
maumar
added a commit
that referenced
this issue
Jan 20, 2022
…when DefaultSchema is configured at the DbContext Level Problem was a discrepancy between RelationalModel build in runtime and the current model (from OnModelCreating) - relational model would set history table schema annotation using the table schema or default schema, however current model wouldn't set those annotations. Model differ would then pick up on those differences and create migration to set the schema for history table. When building actual migration sql we already compensated for the difference and not generate actual sql code, but the problem persists. Fix is to add missing default annotations in the model finalization step. This is a temporary measure until we implement default value conventions (#9329) Fixes #26676
maumar
added a commit
that referenced
this issue
Jan 21, 2022
…when DefaultSchema is configured at the DbContext Level Problem was a discrepancy between RelationalModel build in runtime and the current model (from OnModelCreating) - relational model would set history table schema annotation using the table schema or default schema, however current model wouldn't set those annotations. Model differ would then pick up on those differences and create migration to set the schema for history table. When building actual migration sql we already compensated for the difference and not generate actual sql code, but the problem persists. Fix is to add missing default annotations in the model finalization step. This is a temporary measure until we implement default value conventions (#9329) Fixes #26676
ajcvickers
added
punted-for-7.0
Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints.
and removed
propose-punt
labels
Apr 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-conventions
area-model-building
consider-for-current-release
punted-for-6.0
punted-for-7.0
Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints.
type-enhancement
This would be an implementation of the Transparent Functional Reactive Programming where the model and all its state becomes observable, default values are computable and a new reactive type of conventions is added.
Default values are only computed when the corresponding value is requested and it hasn't been overridden. Default values and reactive conventions automatically subscribe to the changes on all used inputs and rerun if any input changes.
If a reactive convention implements specific convention interfaces they can be used to run a faster local version.
Observable value changes are grouped in the current convention batch and the reactions are executed atomically.
This is closely related to #15898. A new Default
ConfigurationSource
will be added to indicate that a value is set through this mechanism.This will allow to efficiently calculate the values for value generated, type mapping (review usages of
ProviderConventionSetBuilderDependencies.TypeMappingSource
), column and table name which in turn allows removing TableNameFromDbSetConvention and droppingDbContext
andDbSetFinder
dependencies from RelationalConventionSetBuilder.The text was updated successfully, but these errors were encountered: