Skip to content

What does Ecto Changeset do? #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
drozzy opened this issue Oct 15, 2018 · 3 comments
Open

What does Ecto Changeset do? #3

drozzy opened this issue Oct 15, 2018 · 3 comments

Comments

@drozzy
Copy link

drozzy commented Oct 15, 2018

Just curious what this import does?

@burmajam
Copy link
Member

burmajam commented Oct 15, 2018 via email

@drozzy
Copy link
Author

drozzy commented Oct 21, 2018

How?
Sorry I know nothing about ecto changesets. I thought they were only for database models in ORM

@burmajam
Copy link
Member

Ecto doesn't have to be used as ORM only. In fact, 3.0 or 3.1 will split query from changeset features in different libraries. https://github.com/exponentially/extreme_system_example/blob/master/apps/users/lib/example/aggregates/user_impl.ex#L24 is place where we are validating update_profile command that name is present and it has at least 6 characters. If validation fails, API will respond with 422 and errors in body

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants