getForeignKeyFields example

if (!$command instanceof ChangeSetAware || !\in_array($entity$associatedEntities, true)) {
                continue;
            }

            if ($command instanceof DeleteCommand) {
                $command->requestChangeSet();

                continue;
            }

            foreach ($this->getForeignKeyFields($definition) as $field) {
                if ($command->hasField($field->getStorageName())) {
                    $command->requestChangeSet();
                }
            }
        }
    }

    public function onEntityWritten(EntityWrittenContainerEvent $event): void
    {
        $associationFields = $this->getAssociationFields();
        $ruleIds = [];

        
Home | Imprint | This part of the site doesn't use cookies.