File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -124,13 +124,11 @@ end
124124#### The first schema
125125
126126```elixir
127- defmodule Movie do
127+ defmodule User do
128128 use Ecto.Schema
129129
130- schema "movies" do
131- field :title, :string
132- field :release_date, :date
133- many_to_many :actors, Actor, join_through: "movies_actors"
130+ schema "users" do
131+ many_to_many :organizations, Organization, join_through: "users_organizations"
134132 end
135133end
136134```
@@ -139,12 +137,11 @@ end
139137#### The second schema
140138
141139```elixir
142- defmodule Actor do
140+ defmodule Organization do
143141 use Ecto.Schema
144142
145- schema "actors" do
146- field :name, :string
147- many_to_many :movies, Movie, join_through: "movies_actors"
143+ schema "organizations" do
144+ many_to_many :users, Organization, join_through: "users_organizations"
148145 end
149146end
150147```
You can’t perform that action at this time.
0 commit comments