![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/app/bundles/CoreBundle/Doctrine/Mapping/ |
<?php namespace Mautic\CoreBundle\Doctrine\Mapping; /** * Override Doctrine's builder classes to add support to orphanRemoval until the fix is incorporated into Doctrine release * See @see https://github.com/doctrine/doctrine2/pull/1326/. * * Also gives support for allowing a many-to-one to be the primary key */ class AssociationBuilder extends \Doctrine\ORM\Mapping\Builder\AssociationBuilder { /** * Set orphanRemoval. * * @param bool $orphanRemoval * * @return AssociationBuilder */ public function orphanRemoval($orphanRemoval = true) { $this->mapping['orphanRemoval'] = $orphanRemoval; return $this; } /** * Allow a many-to-one to be the ID. * * @return $this */ public function isPrimaryKey() { $this->mapping['id'] = true; return $this; } }