S
def update_tag_spots(%Tag{} = tag, spots \\ []) when is_list(spots) do
tag
|> Tag.spots_changeset(spots)
|> Repo.update()
end
Size: a a a
S
def update_tag_spots(%Tag{} = tag, spots \\ []) when is_list(spots) do
tag
|> Tag.spots_changeset(spots)
|> Repo.update()
end
S
unique_constraint
LL
unique_constraint
ecto
с MyXQL
неправильно обрабаывают эту ошибку. Сделай issue
S
S
ERROR 23505 (unique_violation) duplicate key value violates unique constraint "tags_spots_tag_id_spot_id_index"
S
LL
V
_
D
V
LL
elm
и pandoc
. Ещё есть xmonad
. КонецLL
_
_
S
- many_to_many :spots, Spot, join_through: "tags_spots", on_replace: :delete
+ many_to_many :spots, Spot, join_through: TagSpot, on_replace: :delete
LL
- many_to_many :spots, Spot, join_through: "tags_spots", on_replace: :delete
+ many_to_many :spots, Spot, join_through: TagSpot, on_replace: :delete
S
join_through
- Atom (representing a schema) or a string (representing a table) for many to many associationsSK
LL
if
changeset
-е