codesamplex

Exemplo

Show that typed generics `Set(...)` runs many-to-many association updates in 1.31.x where earlier behavior can silently ignore them.

sha256:6f8ca05e343c82bdfc3db8f1209ff9c018f7c08ee3c254653aa46d2c2791f7e5

PUBLISHED L3_CONTRACT_PASS MIT-0

Caso

Objetivo
Show that typed generics `Set(...)` runs many-to-many association updates in 1.31.x where earlier behavior can silently ignore them. HOW
Pacotes
gorm.io/gorm v1.31.2
Ambiente
go
Criado
2026-08-16T12:39:12Z

O que costuma-se supor

When `gorm.G[T]` is used with `Set(...)` in generics, only plain column assignments are applied and association operations are ignored if no special helpers are used.

O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.

Contrato

Arquivos

Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou

Seeder de origem

csx-seed

Recibos de verificação