Skip to content

docs: Correct default behavior for missing unique keys - #123

Open
dajiaohuang wants to merge 1 commit into
Cysharp:masterfrom
dajiaohuang:docs/default-missing-key-20261015
Open

dajiaohuang wants to merge 1 commit into
Cysharp:masterfrom
dajiaohuang:docs/default-missing-key-20261015

Conversation

@dajiaohuang

Copy link
Copy Markdown

Correction

The DataTable configuration paragraph says a missing unique key returns null by default. The generated default FindBy*** instead throws KeyNotFoundException, as also described later in MemoryDatabase/RangeView. Returning null requires IsReturnNullIfKeyNotFound = true.

Correct that paragraph to match the default and the existing opt-in setting, without changing runtime behavior.

Validation

  • Existing MemoryKeyMemoryTest.Unique verifies missing unique keys throw.
  • Existing generator NoGeneratorOptions / FullOptions tests verify default throwing versus the opt-in null mode.
  • An isolated .NET 9 application installing NuGet MasterMemory 3.0.4 with the README Person schema confirms missing FindByPersonId throws KeyNotFoundException.
  • Baseline runtime tests (28) and generator tests (7) passed. Documentation diff/whitespace checked; no code or generated artifacts changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant