### Elixir version 1.17.2 ### Database and Version PostgreSQL 15.8 ### Ecto Versions 3.12.4 ### Database Adapter and Versions (postgrex, myxql, etc) postgrex, latest ### Current behavior ``` {:ok, existing_profile} = TestRepo.insert(%Profile{name: "profile"}) changeset = %Author{} |> Changeset.change() |> Changeset.put_assoc(:profile, existing_profile) # currently returns false however it is clearly changed Changeset.changed?(changeset, :profile) changeset = %Author{profile: existing_profile} |> Changeset.change() |> Changeset.put_assoc(:profile, nil) # currently crashes Changeset.changed?(changeset, :profile) ``` ### Expected behavior ``` {:ok, existing_profile} = TestRepo.insert(%Profile{name: "profile"}) changeset = %Author{} |> Changeset.change() |> Changeset.put_assoc(:profile, existing_profile) # should return true Changeset.changed?(changeset, :profile) == true changeset = %Author{profile: existing_profile} |> Changeset.change() |> Changeset.put_assoc(:profile, nil) # should return true Changeset.changed?(changeset, :profile) == true ```