Skip to content

Commit

Permalink
Fix doctrine attribute error (#78)
Browse files Browse the repository at this point in the history
`mappedBy` is by default the first parameter passed to the `OneToMany` attribute. Therefore, putting an unnamed parameter first causes issues.

> Named parameter $mappedBy overwrites previous argument
  • Loading branch information
JoppeDC committed Feb 7, 2024
1 parent 5fd8b30 commit 3f0ed91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/TierPriceableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function initTierPriceableTrait(): void
}

/** @var ArrayCollection<int, TierPriceInterface> */
#[OneToMany(TierPrice::class, mappedBy: "productVariant", orphanRemoval: true, cascade: ['all'])]
#[OneToMany(mappedBy: "productVariant", targetEntity: TierPrice::class, cascade: ['all'], orphanRemoval: true)]
#[OrderBy(['customerGroup' => 'ASC', 'qty' => 'ASC'])]
protected $tierPrices;

Expand Down

0 comments on commit 3f0ed91

Please sign in to comment.