https://github.com/merqlove/some_ecto
Example of Ecto error on preloading belongs_to associations for embedded schemas
https://github.com/merqlove/some_ecto
ecto elixir example feature issue request
Last synced: about 1 month ago
JSON representation
Example of Ecto error on preloading belongs_to associations for embedded schemas
- Host: GitHub
- URL: https://github.com/merqlove/some_ecto
- Owner: merqlove
- License: mit
- Created: 2017-02-15T09:46:21.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-15T11:23:01.000Z (almost 9 years ago)
- Last Synced: 2025-01-21T14:45:55.119Z (about 1 year ago)
- Topics: ecto, elixir, example, feature, issue, request
- Language: Elixir
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SomeEcto
Example of Ecto error on preloading belongs_to associations for embedded schemas:
```
1) test preload for embed changeset with valid attributes (SomeEctoTest)
test/some_ecto_test.exs:17
** (MatchError) no match of right hand side value: %SomeEcto.Patterson{age: nil, first_name: "some content", id: "a337aa63-b9ef-4e3b-ac8d-c5166767259f", last_name: "some content", party: #Ecto.A
ssociation.NotLoaded, party_id: 33}
stacktrace:
test/some_ecto_test.exs:27: (test)
```
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:
1. Add `some_ecto` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:some_ecto, "~> 0.1.0"}]
end
```
2. Ensure `someEcto` is started before your application:
```elixir
def application do
[applications: [:some_ecto]]
end
```