mathieuprog / polymorphic_embed

Polymorphic embeds in Ecto
Apache License 2.0
341 stars 63 forks source link

Ecto 3.12 breaks it for enum fields #108

Closed thiagogsr closed 3 months ago

thiagogsr commented 3 months ago

Changelog: https://github.com/elixir-ecto/ecto/blob/master/CHANGELOG.md#potential-incompatibilities

"[Ecto.ParameterizedType] Parameterized types are now represented internally as {:parameterized, {mod, state}}. While this representation is private, projects may have been relying on it, and therefore they need to adapt accordingly. Use Ecto.ParameterizedType.init/2 to instantiate parameterized types."

I think it breaks here: https://github.com/mathieuprog/polymorphic_embed/blob/68e54e0df69da37bc48bdc160c77579a59adbdb1/lib/polymorphic_embed.ex#L710

{:parameterized, {mod, state}} vs {:parameterized, mod, state}