Skip to content

Commit

Permalink
Merge pull request #37 from SpearDevs/update-object-relations
Browse files Browse the repository at this point in the history
Set cascade delete on ShopUser delete
  • Loading branch information
TomaszLach2 authored Jan 8, 2024
2 parents b2764d4 + 84d8ce0 commit aa30f58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PushNotificationHistory implements PushNotificationHistoryInterface
/**
* @ORM\ManyToOne(targetEntity="Sylius\Component\Core\Model\ShopUserInterface")
*
* @ORM\JoinColumn(nullable=false)
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private ShopUserInterface $user;

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/UserSubscription/UserSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class UserSubscription implements UserSubscriptionInterface, ResourceInterface
/**
* @ORM\ManyToOne(targetEntity="Sylius\Component\Core\Model\ShopUserInterface")
*
* @ORM\JoinColumn(nullable=false)
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private ShopUserInterface $user;

Expand Down

0 comments on commit aa30f58

Please sign in to comment.