Skip to content

[Form] Doctrine mapping for a collection of foms #22345

@ThomasLandauer

Description

@ThomasLandauer

I have some questions about https://symfony.com/doc/current/form/form_collections.html#allowing-tags-to-be-removed that I'd like to discuss before I can come up with a PR:

  1. Depending on your persistence layer, this may or may not be enough to actually remove the relationship between the removed Tag and Task object.

    • What does "remove the relationship" mean? In my mind, I want to delete the child entity (Tag), not only remove its connection to the parent entity (Task).
    • The setting which "Depending on your persistence layer" is referring to is orphanRemoval, right? I'd like to mention this explicitly - but in this paragraph or in the box about Doctrine? Why is Doctrine treated like a special case in its own box at all?
  2. Normally in this case you'll have a many-to-one relationship and the deleted tags will disappear and persist correctly

    • The entire page is about a Task --1:n--> Tag relation. So what does "Normally in this case" mean, and why is the opposite direction even mentioned at all?
    • In Doctrine, the owning side is always the "many" side, so "and the deleted tags will disappear and persist correctly" is not true, IMO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions