a helpful primer for users sick of git's poorly-named commands
I've used Git since 2011, and this is the stuff that I've always had to Google to remember. I hope it helps you not hate Git so much.
| # To use the "confirm" target inside another target, | |
| # use the " if $(MAKE) -s confirm ; " syntax. | |
| mycommand: | |
| @if $(MAKE) -s confirm ; then \ | |
| execute_your_command_here ; \ | |
| fi | |
| .PHONY: mycommand | |
| # The CI environment variable can be set to a non-empty string, |
TLDR: The cascade={"remove"} is like a "software" onDelete="CASCADE", and will remove objects from the database only when an explicit call to $em->remove() occurs. Thus, it could result in more than one object being deleted. orphanRemoval can remove objects from the database even if there was no explicit call to ->remove().
I answered this question a few times to different people so I will try to sum things up in this Gist.
Let's take two entities A and B as an example. I will use a OneToOne relationship in this example but it works exactly the same with OneToMany relationships.
class A