-
Notifications
You must be signed in to change notification settings - Fork 36
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
Return unique constraint errors for custom primary keys #7
Comments
Thanks. Apologies I have been busy recently. Will investigate this. |
Documentation for insert_new agrees with your proposed change. I shall raise a new release shorty. Thank you!! |
You don't need to apologize @evadne :). I'll be happy to test it when this new release is available. Thank you for the time to look into it! |
@wmartins FYI: Change is live @ |
Looking good @evadne, here's my application before and after those changes: Before: not showing field validation error After: showing field validation error |
Released 0.1.5 with thanks ❤️ |
Hi there! I've been using Etso for a while now and it's a great solution to get an Ecto based project up and running in no time.
One thing that I'm missing is to be able to get the error that happens when trying to insert a duplicate entry. In other words, I get a changeset that is invalid, however, the
errors
property is empty. The impact is that I'm unable to show this error information on a form.I've been dabbling a litte with the implementation in order to check if it's possible, and here are my findings.
First, the empty error is justified by the following line:
etso/lib/etso/adapter/behaviour/schema.ex
Line 24 in f25bdea
If I change that to this:
Now I start to receive the error:
What are your thoughts on that, is that something you wish to support?
The text was updated successfully, but these errors were encountered: