ecto v3.5.0 Release Notes

Release Date: 2020-10-03 // over 3 years ago
  • v3.5 requires Elixir v1.8+.

    🐛 Bug fixes

    • [Ecto.Changeset] Ensure :empty_values in cast/4 does not automatically propagate to following cast calls. If you want a given set of :empty_values to apply to all cast/4 calls, change the value stored in changeset.empty_values instead
    • [Ecto.Changeset] Potentially breaking change: Do not force repository updates to happen when using optimistic_lock. The lock field will only be incremented if the record has other changes. If no changes, nothing happens.
    • [Ecto.Changeset] Do not automatically share empty values across cast/3 calls
    • [Ecto.Query] Consider query prefix in cte/combination query cache
    • [Ecto.Query] Allow the entry to be marked as nil when using left join with subqueries
    • [Ecto.Query] Support subqueries inside dynamic expressions
    • [Ecto.Repo] Fix preloading when using dynamic repos and the sandbox in automatic mode
    • [Ecto.Repo] Do not duplicate collections when associations are preloaded for repeated elements

    ✨ Enhancements

    • [Ecto.Enum] Add Ecto.Enum as a custom parameterized type
    • [Ecto.Query] Allow :prefix in from to be set to nil
    • [Ecto.Query] Do not restrict subqueries in where to map/struct types
    • [Ecto.Query] Allow atoms in query without interpolation in order to support Ecto.Enum
    • [Ecto.Schema] Do not validate uniqueness if there is a prior error on the field
    • [Ecto.Schema] Allow redact: true in field
    • [Ecto.Schema] Support parameterized types via Ecto.ParameterizedType
    • [Ecto.Schema] Rewrite embeds and assocs as parameterized types. This means __schema__(:type, assoc_or_embed) now returns a parameterized type. To check if something is an association, use __schema__(:assocs) or __schema__(:embeds) instead