Skip to content
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

Support casting from string in embed #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

feymartynov
Copy link

@feymartynov feymartynov commented May 7, 2017

I use PostgresSQL's JSON_AGG function which serializes rows from a joined table into single JSON field and then use Ecto's embeds_many to inflate them into structs. These structs have Arc type field. When Ecto calls cast/2 with a string of the form file_name?updated_at as the second argument it matches the last definition which tries to store this string and fails but I expect it to do the same things as load/2 does in this case. So here is my patch for it.

@vyorkin
Copy link

vyorkin commented Jul 2, 2017

hey guys! is it going anywhere? cc @stavro

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

Successfully merging this pull request may close these issues.

2 participants