Skip to content

Commit

Permalink
Internal: Remove orphanRemoval option in Resource - ResourceNode rela…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
AngelFQC committed Jan 30, 2024
1 parent f797a32 commit a54ac03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CoreBundle/Entity/AbstractResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -231,7 +231,7 @@ public function getResourceNode(): ?ResourceNode
return $this->resourceNode;
}

public function setResourceNode(ResourceNode $resourceNode): self
public function setResourceNode(?ResourceNode $resourceNode): self
{
$this->resourceNode = $resourceNode;

Expand Down

0 comments on commit a54ac03

Please sign in to comment.