scaffolding: computed column does not include `HasComputedColumnSql`.
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start at the scaffolding generator path that converts computed-column metadata into the generated DbContext, using the shown Cloud Spanner query and actual output as the reproduction. Done means the generated property also includes HasComputedColumnSql with the computed SQL while preserving ValueGeneratedOnAddOrUpdate behavior.
Written by the indexing model from the issue text.
Description
The current scaffolding generator ensures that a valid DbContext that can be used is generated. If we also include the computed SQL in the meta model, EF Core will not respect the ValueGeneratedOnAddOrUpdate part of the meta model, and will try to insert values into the computed column. Cloud Spanner does not allow that.
Query:
FullName STRING(400) NOT NULL AS (COALESCE(FirstName || ' ', '') || LastName) STORED,
Actual:
entity.Property(e => e.FullName)
.IsRequired()
.HasMaxLength(400)
.ValueGeneratedOnAddOrUpdate();
Excepted:
entity.Property(e => e.FullName)
.IsRequired()
.HasMaxLength(400)
.ValueGeneratedOnAddOrUpdate()
.HasComputedColumnSql("(COALESCE(FirstName || ' ', '') || LastName) STORED");
- Dominant language
- C#
- Stars
- 34
- Forks
- 13
- Avg merge
- 5h 53m
- Merged PRs (30d)
- 11
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/dotnet-spanner-entity-framework
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
googleapis/dotnet-spanner-entity-framework#775 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
googleapis/dotnet-spanner-entity-framework#777 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
googleapis/dotnet-spanner-entity-framework#767 ·
Maintainers usually reply within 1 day
-
priority: p2 samples type: bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
googleapis/dotnet-spanner-entity-framework#722 ·
Maintainers usually reply within 1 day
-
priority: p2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
googleapis/dotnet-spanner-entity-framework#712 ·
Maintainers usually reply within 1 day
All issues in googleapis/dotnet-spanner-entity-framework
Similar issues
-
:watch: Not Triaged dotnet-target-version
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
copilot documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
dotnet/dotnet-api-docs#13124 ·
Maintainers usually reply within 1 day
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
BHoM/MidasCivil_Toolkit#441 ·