CodeSampleX

Beispiel

Manage unloaded association state with Ecto.Association.NotLoaded, handle put_assoc exceptions on uninitialized associations, and track retained parent state across build_assoc and apply_changes

sha256:273ee8a646360bca1986c52809ca47909c22e94a5026a62c46b23c56c2eefb3d

PUBLISHED L3_CONTRACT_PASS MIT-0

Ausführungsbelege

Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.

BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS

Deklarierte Umgebung

Ausführungskontext
elixir
Betriebssystem
linux
Architektur
x64
Runtime
elixir
Sprache
elixir
Paketmanager
mix

Umgebungen der Verifizierungsläufe

Ausführungskontext
elixir 1
Betriebssystem
linux alpine · musl
Architektur
x64
Runtime
elixir 1
Sprache
elixir
Paketmanager
mix
Ausführung
container · docker

CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17

Fall

Ziel
Manage unloaded association state with Ecto.Association.NotLoaded, handle put_assoc exceptions on uninitialized associations, and track retained parent state across build_assoc and apply_changes HOW
Pakete
ecto 3.14.1
Umgebung
elixir
Erstellt
2026-08-17T04:43:50Z

Häufige Annahme

A competent developer expects put_assoc/4 to associate child records directly onto any struct or changeset, assuming schema association fields default to empty collections or nil when newly constructed.

So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.

Contract

Dateien

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed

Verifizierungsbelege