Skip to content

Weasel 9.48.0 - #5802

Merged
jeremydmiller merged 1 commit into
masterfrom
bump/weasel-9.48.0
Nov 2, 2026
Merged

jeremydmiller merged 1 commit into
masterfrom
bump/weasel-9.48.0

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Weasel 9.48.0, published today. Release notes: https://weasel.jasperfx.net/release-9-48

Nine PRs went into it: the parameter-type catch-all fix (weasel#758/#759 → #760) and the three issues it uncovered (#761, #762, #763), three SQL Server bugs found from Polecat (#764, #765, #766), MySqlConnector 2.6.1 for GHSA-473q-m89c-ghf8 (#767) and JasperFx 2.98.0 (#769).

Two behaviour changes upstream, neither of which this repo trips:

  1. An unmapped type now defers instead of being guessed at, so ToParameterType throws for one where it returned a character catch-all; and a DateTime parameter binds as DateTime2 rather than a date-only type that dropped the time of day. The generated column type is unchanged, so no schema diff.
  2. An enum binds as an integer unless told its EnumStorage, with new overloads taking one. Affects an AsString consumer on MySQL or Oracle only.

What reaches Marten

Three of the six issues are SQL Server only and inert here.

  • weasel#758/Query by different id member #759 — PostgreSQL was one of the two providers that already fell through correctly, so the resolution behaviour Marten sees is unchanged. The part that was a hard failure rather than a slow query: both AddParameters overloads resolved through ToParameterType on the type, going around the value-aware seam weasel#403 added for Npgsql, so a UTC DateTime in a parameter bag was bound as timestamp without time zone and Npgsql threw outright, while the same value through AddNamedParameter worked.
  • weasel#764 — PostgreSQL's numeric arm in PartitionExtensions.FormatSqlValue rendered with the current culture: a decimal partition bound carried a comma separator under de-DE, and a negative one a U+2212 minus sign under sv-SE, fi-FI, lt-LT or nb-NO. The date arms were already invariant with a comment saying why, which is exactly what made the numeric one read as deliberate. Marten's tenant and list partitions are string bounds, so this bites a numeric partition bound only.
  • weasel#761 — PostgreSQL keeps Integer for an int-backed enum. One difference: an enum now resolves through its underlying type, so a long-backed enum gives Bigint rather than silently narrowing to Integer.
  • Inert: weasel#762, delay document mapping validation until store construction - fixes #743 #763, default index on DocumentTypeColumn #765, Add index on column doc_type, see #765 #766.

I checked the call sites rather than assuming: RuntimeCompiledQueryDescriptorFactory and PostgresStorageDialect call ToParameterType and both pass types Npgsql maps; StoreOptions.Identity and ExecuteSqlStorageOperation use TryGetDbType, which still returns null for an unmapped type.

Verification

No Marten code changes. dotnet restore and dotnet build src/Marten.slnx clean against the published packages (not a local pack), 0 errors. The JasperFx 2.98.0 floor Weasel.Core now declares was already satisfied by #5801.

🤖 Generated with Claude Code

Three of the six issues in this Weasel release are SQL Server only and inert
here. What reaches Marten is the PostgreSQL parameter-type work and one
PostgreSQL partitioning fix.

weasel#758/#759 is the headline: a private helper in five providers ended in
`?? <catch-all>`, which can never return null, so every fall-through branch
after the first was dead code. PostgreSQL was one of the two providers that
already fell through correctly, so the resolution behaviour Marten sees is
unchanged. The part that was a hard failure rather than a slow query: both
AddParameters overloads resolved through ToParameterType on the TYPE, going
around the value-aware seam weasel#403 added for Npgsql, so a UTC DateTime in a
parameter bag was bound as `timestamp without time zone` and Npgsql threw
outright, while the same value through AddNamedParameter worked.

weasel#764 fixes PostgreSQL's numeric arm in PartitionExtensions.FormatSqlValue,
which rendered with the current culture: a decimal partition bound carried a
comma separator under de-DE and a negative one a U+2212 minus sign under sv-SE,
fi-FI, lt-LT or nb-NO. The date arms were already invariant, which is what made
the numeric one read as deliberate.

No Marten code changes. Restores and builds clean against the published
packages; the JasperFx 2.98.0 floor Weasel.Core now declares was already
satisfied by #5801.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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