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

Add support for default value conventions #9329

Open
Tracked by #22952
AndriySvyryd opened this issue Aug 3, 2017 · 0 comments
Open
Tracked by #22952

Add support for default value conventions #9329

AndriySvyryd opened this issue Aug 3, 2017 · 0 comments
Assignees
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
Copy link
Member

AndriySvyryd commented Aug 3, 2017

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 dropping DbContext and DbSetFinder dependencies from RelationalConventionSetBuilder.

@AndriySvyryd AndriySvyryd self-assigned this Aug 3, 2017
@divega divega added this to the 2.1.0 milestone Aug 4, 2017
@AndriySvyryd AndriySvyryd removed this from the 2.1.0 milestone Jan 11, 2018
@AndriySvyryd AndriySvyryd changed the title Move TableNameFromDbSetConvention to RelationalModelCustomizer Add support for default value conventions Jan 11, 2018
@ajcvickers ajcvickers added this to the Backlog milestone Jan 17, 2018
@ajcvickers ajcvickers modified the milestones: Backlog, 6.0.0 Oct 28, 2020
@AndriySvyryd AndriySvyryd modified the milestones: 6.0.0, Backlog Jul 16, 2021
@ajcvickers ajcvickers modified the milestones: Backlog, 7.0.0 Oct 22, 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 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
@ajcvickers ajcvickers modified the milestones: 7.0.0, Backlog 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
Projects
None yet
Development

No branches or pull requests

3 participants