EctoMorph.update_struct
You're seeing just the function
update_struct
, go back to EctoMorph module for more information.
Specs
update_struct(ecto_struct(), map()) :: okay_struct() | error_changeset()
Attempts to update the given Ecto Schema struct with the given data by casting data and merging
it into the struct. Uses cast
and changesets to recursively update any nested relations also.
Accepts a whitelist of fields for which updates can take place on. The whitelist can be arbitrarily nested, and Data may be a map, or another struct of any kind. See examples below.
Examples
iex> MyApp.Repo.get(Thing, 10) |> EctoMorph.update
As with cast_to_struct, the data you are updating struct you are updating can be a