codesamplex

Exemple

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

Cas

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

Ce que l'on suppose souvent

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.

L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.

Contrat

Fichiers

Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté

Seeder d'origine

csx-seed

Reçus de vérification