- Remove warning when aliases cannot be expanded (#123).
- Relax
phoenix_live_viewconstraint to allow 1.0.
- Fix usage with Ecto 3.12. Require Ecto 3.12 or later
- Allow inferring type from parent field via new :use_parent_field_for_type option
- Add
Form.source_data/1andForm.source_module/1(get_polymorphic_type/2doesn't work for list of embeds) - Add
:retain_unlisted_types_on_loadand:nilify_unlisted_types_on_loadoptions - MongoDB fix
- Deprecate
:type_fieldin favor of:type_field_name
- Support
sort_paramanddrop_paramfor list of embeds - Add
PolymorphicEmbed.HTML.Component.polymorphic_embed_inputs_for/1(similar toPhoenix.Component.inputs_for/1) - Support updating list of embeds while retaining ids
- Fix form input rendering for list of embeds
- Fix
traverse_errorsfor nested embeds
Breaking Change: The form helper get_polymorphic_type/3 has been updated to get_polymorphic_type/2.
The module name parameter (previously the second parameter) has been removed.
- Default value for polymorphic list of embeds is
[]instead ofnil(followingembeds_many/3) - Support Phoenix HTML 4.0
- Avoid compile-time dependencies between parent and polymorphic embedded schemas
- Use
polymorphic_embeds_one/2andpolymorphic_embeds_many/2macros instead offield/3
- Support IDs
- Make sure that every existing polymorphic
embedded_schemacontains the setting@primary_key false
- Add
polymorphic_embed_inputs_for/2for displaying forms in LiveView - Add
polymorphic_embed_inputs_for/3for displaying forms in Phoenix templates without needing to specify the type
- Add
PolymorphicEmbed.types/2function returning the possible types for a polymorphic field
- Add
:nilifyand:ignorefor:on_type_not_foundoption
- Support the SQLite3 Ecto adapter
ecto_sqlite3
- Fix errors in form for
embeds_onenested intopolymorphic_embed - Refactor
PolymorphicEmbed.HTML.Form
- Add
traverse_errors/2
- Support custom changeset functions through
:withoption
- Add
:requiredoption
- Support custom type field
- Support list of polymorphic embeds
- Force
:on_replaceoption to be explicitly set