mathieuprog / polymorphic_embed

Polymorphic embeds in Ecto
Apache License 2.0
340 stars 62 forks source link

Traverse nested PolymorphicEmbed errors #78

Closed LouisMT closed 6 months ago

LouisMT commented 1 year ago

It seems that traverse_errors/2 currently does not work, if the polymorphic_embeds_* is nested inside an Ecto-native *-to-one or *-to-many association. These errors are never processed.

This PR adds support for this.

Fixes #72

LouisMT commented 1 year ago

I'm a bit confused because of this line in the project's README:

  • Support for nested embeds_one/embeds_many embeds

Does this mean that it should already support polymorphic_embeds_* nested in an embeds_*? Or is it the other way around?

If it's the other way around, I can update this PR to add support for nested embeds_one/embeds_many too.

Reinder1213 commented 1 year ago

@mathieuprog is there any chance you could follow up on this PR? I'm running into the same issue. Thanks!

(Great work on the library btw)

mathieuprog commented 6 months ago

This has been added. Awesome work. Sorry it took so much time. Couldn't merge as there were conflicts.