Answer the question
In order to leave comments, you need to log in
OneToMany Doctrine Symfony 4 how to remove all Many from One?
I have a User object that can write articles. But if I, as an admin, did not like the article, then I delete all his articles with one button.
One: User
Many: Articles
Question : how to implement it?
Answer the question
In order to leave comments, you need to log in
@OneToMany(targetEntity="Article", mappedBy="user", cascade={"all"})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question