Skip to content

Embedded list shows everything if manytomany is empty #177

@DylanKas

Description

@DylanKas

Hi,

I have an issue with my embedded list which is between my classes Intern & Internships which is a ManyToMany relationship.

When an internship has at least one intern, it works fine and we can see it in the embedded list.
However, if my internship has no interns my embedded list shows every intern in my database.

I tried to debug it by looking into the embeddedListAction and I do not know if this is supposed to happen.

When looking at the $paginator variable in embeddedListAction I can see that when I have atleast one intern the query is :

"SELECT entity FROM App\Entity\Intern entity LEFT JOIN entity.person person WHERE entity.id IN (:form_filter_entity_id) ORDER BY entity.id DESC"

But if there are no intern in my internship the query changes to :

"SELECT entity FROM App\Entity\Intern entity ORDER BY entity.id DESC"

Is that an issue with my configuration or does embeddedListAction not support ManyToMany completely ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions