hex ecto 0.14.0
on Hex

latest releases: 3.11.2, 3.11.1, 3.11.0...
8 years ago

Experimental features (please try them out and give feedback)

  • Add Ecto.Pools.SojournBroker as a more flexible and customizable alternative to Ecto.Pools.Poolboy
  • Support for embeds_one and embeds_many

Enhancements

  • Add Ecto.Adapters.SQL.to_sql/3
  • Allow preloads to be customized with queries
  • Store the connection PID in Ecto.LogEntry
  • Support :on_delete when defining has_many and belongs_to in schema
  • Allow renaming tables in migration
  • Include Ecto's processing time along side adapter processing on Ecto.LogEntry.query_time
  • Introduce Ecto.Repo.after_connect/1
  • Support date_add/3 and datetime_add/3 for interval based datetime operations
  • Support :push and :pull array operations in Ecto.Repo.update_all/3

Bug fixes

  • Ensure uniqueness validatior runs the proper check when a scope changed but the value is still the same
  • Fix a bug where it was not possible to add a references column in MySQL in an alter table
  • Minimize query rewriting in has_many/one :through, ensuring a wilder variety of associations are supported
  • Do not fail when compiling queries with empty order or group by expressions
  • Ensure literals in queries are also cast/dump

Backwards incompatible changes

  • Ecto.Repo.update!/2 no longer invokes callbacks if there were no changes, avoiding writing to the database at all (use :force to force callback execution)
  • Ecto.Repo.transaction/2 is now flattened. This means that multiple transaction calls will no longer use savepoints, instead it will be considered as a single transaction, where a failure in any transaction block will trigger the outmost transaction to rollback, even if failures are rescued. This should only affect users that were explicitly relying on the savepoints.
  • :date, :time and :datetime were removed in favor of Ecto.Date, Ecto.Time and Ecto.DateTime
  • Ecto.Changeset.errors now return {"shuold be less than %{count}", count: 3} instead of {"shuold be less than %{count}", 3}
  • Ecto.Adapters.SQL.query/4 now returns a list of lists instead of a list of tuples

Adapter backwards incompatible changes

  • Pass {source, model} in Ecto.Adapter.insert/update/delete
  • SQL adapters are not expected to return each row as a list instead of a tuple
  • id_types/0 were removed in favor of load/2 and dump/2

Don't miss a new ecto release

NewReleases is sending notifications on new releases.