Internal: Remove orphanRemoval option in Resource - ResourceNode relation

pull/5125/head
Angel Fernando Quiroz Campos 10 months ago
parent f797a32c75
commit a54ac03f57
  1. 4
      src/CoreBundle/Entity/AbstractResource.php

@ -70,7 +70,7 @@ abstract class AbstractResource
'message:read',
'c_tool_intro:read',
])]
#[ORM\OneToOne(targetEntity: ResourceNode::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OneToOne(targetEntity: ResourceNode::class, cascade: ['persist'])]
#[ORM\JoinColumn(name: 'resource_node_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
public ?ResourceNode $resourceNode = null;
@ -231,7 +231,7 @@ abstract class AbstractResource
return $this->resourceNode;
}
public function setResourceNode(ResourceNode $resourceNode): self
public function setResourceNode(?ResourceNode $resourceNode): self
{
$this->resourceNode = $resourceNode;

Loading…
Cancel
Save