Enhancements
- Add
Ecto.Assocations.load/3for loading associations - Add
Ecto.Model.primary_key/1andEcto.Model.put_primary_key/3for accessing a model's primary key - Add
Ecto.Repo.oneandEcto.Repo.one!for running query expecting one result - Add
Ecto.Repo.get!that raises when receiving no result - Set foreign key when loading belongs_to association to model
Bug fixes
- Ensure that existing primary key is not overwritten when inserting model
Ecto.Repo.getno longer addslimit: 1to query, it will now raise when receiving more than one result- Properly underscore camelized names in associated models
Backwards incompatible changes
- Removed entities in favor of schema + structs. In particular,
Ecto.Entityis gone as well as thequeryable/2macro. Instead developers should invokeschema/2in their models, which will automatically define a struct in the current module. Now to create or update, developers should usestruct(Post, [])or%Post{}instead of the previousPost.new([])orPost[] - Renamed has_many association function
to_listtoall Ecto.Repo.storage_downandEcto.Repo.storage_upmoved toEcto.Storage