Latest #changesets Threads 
Hey everyone :waving_hand:
I’m excited to share Sampo, a tool suite to automate changelogs, versioning, and publishing—even for monorepo...
New
I am wondering why when I ran Ecto.Changeset.apply_changes(changeset) the prepared changes function on that changeset did not run. I have...
New
Found a clean solution for adding custom error messages when using Ecto.Changeset.cast/4.
The issue presented is cast/4 does not allow :...
New
I have question on the limitations of embeds_many. I want non-homogenous embeds many.
Despite being able to define how to handle casting...
New
I have a “smart” put function that takes care of saving (creating or updating) a resource and all its sub resources automatically. It wor...
New
Hi all
Context: external system with inconsistent, but feature-full API
We use an external SaaS system for hiring people. There are can...
New
Hey folks,
I wondered whether it is possible to update a struct without explicitly defining the attributes that were updated. So, someth...
New
I want to check if my changeset has changes in a true/false way. changset.changes returns %{} when empty, which is truthy, but I need tha...
New
Hello all,
I’m trying to implement oauth server and I’m not sure how to implement inserting token into database. For simplicity I have t...
New
Hello everyone,
I’m trying to take data from one structure and save it on a similar structure when creating a record through function.
...
New
This Week's Trending
This Month's Trending
This Year's Trending
Hey everyone :waving_hand:
I’m excited to share Sampo, a tool suite to automate changelogs, versioning, and publishing—even for monorepo...
New
I am wondering why when I ran Ecto.Changeset.apply_changes(changeset) the prepared changes function on that changeset did not run. I have...
New
Last Three Year's Trending
I am currently using the following snippet to do it
old_value =
cs
|> Map.get(:data, %{})
|> Map.get(field, ...
New
How exactly i can add an error into nested/embedded changeset? Don’t think add_error can do this.
Context: regular changeset validation ...
New
Hi all
Context: external system with inconsistent, but feature-full API
We use an external SaaS system for hiring people. There are can...
New
I want to check if my changeset has changes in a true/false way. changset.changes returns %{} when empty, which is truthy, but I need tha...
New
Hey folks,
I wondered whether it is possible to update a struct without explicitly defining the attributes that were updated. So, someth...
New
Found a clean solution for adding custom error messages when using Ecto.Changeset.cast/4.
The issue presented is cast/4 does not allow :...
New
I have question on the limitations of embeds_many. I want non-homogenous embeds many.
Despite being able to define how to handle casting...
New
I have a “smart” put function that takes care of saving (creating or updating) a resource and all its sub resources automatically. It wor...
New
Trending Over Three Years
I’m using changesets to validate various API submissions and I’m wondering if someone has come up with an easy way to format the errors? ...
New
I'm having trouble understanding the difference between cast_assoc, assoc_constraint and foreign_key_constraint in a changeset. More spec...
New
In Ecto.Changeset — Ecto v3.11.1 there is a part which says:
The :delete option in particular must be used carefully as it would allow ...
New
How can i add changeset errors from Controller when i am trying to add error like follow
Ecto.Changeset.add_error(changeset, :old_pass...
New
When I'm creating Post insert changeset from iex:
new_post = %MyProject.Post{}
changeset = Ecto.Changeset.cast(new_post, %{body: "Bod...
New
My question is around Ecto.Changeset and the need to validate entire models, not just the passed in params. Basically, I’ve found a use...
New
Hi there,
I’m trying to capture constraint exceptions when a user attempts to create a database record with a primary key that already ...
New
Hello,
I am trying to cast data for which I specify types dynamically at runtime. In my particular case I’d like to validate that a sing...
New
I have an embedded schema, and I noticed that it was always writing to the DB, even when it wasn’t updated from its default value [].
Ch...
New
I am trying to update a changeset from an invalid set of changes to a valid set, but the errors do not reflect the change. The following ...
New
I’m working on a table to store shipping addresses. I would like to add a fingerprint of each address so that I can more easily tell whe...
New
Question / comment / maybe bug report
I was surprised that this didn’t work:
def validate_not_cleared(changeset) do
validate_change(c...
New
With these modules:
defmodule Foo do
use Ecto.Schema
import Ecto.Changeset
schema "foo" do
field(:name, :string, null: false)...
New
This library contains common helpers used with Ecto.Changeset.
I noticed myself copying over validators from various projects multiple t...
New
From Programming Ecto’s book:
def new(conn, _params) do
changeset = User.changeset(%User{}, %{})
render(conn, changeset: changeset)
...
New
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #ash-questions
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #discussion
- #javascript
- #elixirconf
- #library
- #oban-questions
- #dialyzer
- #docker
- #onsite
- #authentication
- #podcasts
- #full-time-contract
- #umbrella
- #code-sync
- #ecto-query
- #phoenix_html
- #iex
- #graphql
- #genstage
- #elixir-ls
- #nerves-questions
- #podcasts-by-brainlid
- #supervisor
- #websockets
- #distillery
- #advent-of-code
- #blog-post
- #livebook-questions
- #processes
- #forms
- #api
- #metaprogramming







