Skip to content

explain that using by_reference only works with add/removeEntityNameSingular in English #6681

Closed
@michelepatrassi

Description

@michelepatrassi

I had to manage a one-to-many relations from ad Event to Images, so after some search I founded this:

Using by_reference force the framework to use only add/removeEntityNameSingular, so if I have an images property it uses addImage or removeImage...this is well explained in this SO answer:

-http://stackoverflow.com/questions/33358989/symfony2-form-collection-not-calling-addxxx-and-removexxx-even-if-by-reference

The problem is that I use to write code in my native language most of the time, so of course my singular/plural didn't work! I lost a lot of time searching for the root problem elsewhere (es: Doctrine), I think that add this detail to the docs can save time for who will meet the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FormhasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions