   defp recursively_strip(record = %{__meta__: %{__struct__: Ecto.Schema.Metadata}}) do
     record
     |> strip_has_assocs
-    |> handle_belongs_to_assocs
+    |> set_persisted_belongs_to_ids
+    |> drop_belongs_to_assocs
     |> drop_ecto_fields
     |> drop_fields_with_nil_values
   end

            belongs_to = %{__meta__: %{__struct__: Ecto.Schema.Metadata, state: :loaded}} ->
              record
              |> set_belongs_to_primary_key(belongs_to, association)
              |> Map.delete(association.field)

            _ ->
              Map.delete(record, association.field)
          end
        _ ->
          record
      end

    end
  end

  defp set_persisted_belongs_to_ids(record = %{__struct__: struct, __meta__: %{__struct__: Ecto.Schema.Metadata}}) do
    Enum.reduce(struct.__schema__(:associations), record, fn(association_name, record) ->
      association = struct.__schema__(:association, association_name)

