Skip to content

Instantly share code, notes, and snippets.

View toutvukantabu's full-sized avatar
🇨🇵
working at home

Gwendal Bescont toutvukantabu

🇨🇵
working at home
  • Lyon
  • 05:21 (UTC +02:00)
View GitHub Profile
@UbuntuEvangelist
UbuntuEvangelist / Completely Uninstall LAMP Ubuntu
Last active July 27, 2024 02:55
Completely Uninstall LAMP Ubuntu 20.04 LTS
HIRE Me For Your Project Support :)
Telegram: https://t.me/LinuxGun
#!/bin/bash
# Completely Remove Apache Ubuntu
service apache2 stop
apt purge apache2 apache2-utils apache2.2-bin
apt remove apache2.*
apt autoremove
whereis apache2
@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active July 6, 2024 19:43
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.

What's the difference between cascade="remove" and orphanRemoval=true in Doctrine 2

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