polymorphic_embed icon indicating copy to clipboard operation
polymorphic_embed copied to clipboard

`polymorphic_embeds_many` seems unfinished.

Open hickscorp opened this issue 2 years ago • 0 comments

I've been using this lib for a long time, but just ran across use cases as it's the first time I try polymorphic_embeds_many. It seems to me that there's missing functionality.

Consider a schema having two possible types of embeds in a polymorphic_embeds_many "things" field. How do you:

  • Add to the list, while leveraging polymorphism (Ideally using the type field in attrs to use the right module to call changeset/2 on)?
  • Remove to the list ...?
  • Chain calls... Eg model |> add_thing_to_things(%{...}) |> add_thing_to_things(%{...}) ...?

hickscorp avatar Dec 21 '23 17:12 hickscorp