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

Field Values that are Ecto Embedded Structs or Embedded Lists #218

Open
jeregrine opened this issue Jan 14, 2020 · 0 comments
Open

Field Values that are Ecto Embedded Structs or Embedded Lists #218

jeregrine opened this issue Jan 14, 2020 · 0 comments

Comments

@jeregrine
Copy link

Right now we don't explicitly support Ecto Embedded schemas, if you manually do functions you can strip away the Struct meta data and embed the raw map.

JSON API does allow for any json type including lists or objects.

Since these embedded data structures typically don't have IDs and are not typically query-able as resources they should not be included as relationships.

We could make this easier by recognizing that the field is a struct and pulling out non-struct fields with Map.from_struct and structs from lists.

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

No branches or pull requests

1 participant