Top "Ecto" questions

Ecto is a domain specific language for writing queries and interacting with databases in Elixir.

What is the simplest way to do upsert with Ecto (MySQL)

Doing upsert is common in my app and I want to implement the cleanest and simple way to implement upsert. …

mysql elixir phoenix-framework ecto
has_many, through associations in Ecto

I'm still trying to grok how to deal with creating/updating has_many, through: associations in Ecto. I've re-read José…

elixir phoenix-framework ecto
elixir - how to add conditional pipe into pipeline?

I have a small pipeline in elixir, it's about changing ecto model state: model |> cast(params, ~w(something), ~w()) |&…

elixir ecto
Elixir Ecto: How to set a belongs_to association in a changeset

I am a bit stuck in how to actually set an association with a changeset. I have this code in …

elixir ecto
Modify foreign key in Ecto

I have this original migration that have already been run and sent upstream: create table(:videos) do add :url, :string …

elixir phoenix-framework ecto
How to handle associations and nested forms in Phoenix framework?

What is the way to handle associations and nested forms in Phoenix framework? How would one create a form with …

elixir phoenix-framework ecto
How to get the "belongs_to" association with Ecto in Elixir?

I have a Post and Comment model. One post has many comments and one comment belongs to a post. When …

elixir phoenix-framework ecto