Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

scaffolding: computed column does not include `HasComputedColumnSql`.

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
databases, tooling

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

known limitation type: feature request

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/dotnet-spanner-entity-framework

All issues in googleapis/dotnet-spanner-entity-framework

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.