Skip to content

Commit 31c5930

Browse files
committed
the product category must be nullable
1 parent a8ea2d2 commit 31c5930

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doctrine/associations.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ the ``Product`` entity (and getter & setter methods):
146146
147147
/**
148148
* @ORM\ManyToOne(targetEntity="App\Entity\Category", inversedBy="products")
149-
* @ORM\JoinColumn(nullable=false)
150149
*/
151150
private $category;
152151
@@ -155,7 +154,7 @@ the ``Product`` entity (and getter & setter methods):
155154
return $this->category;
156155
}
157156
158-
public function setCategory(Category $category): self
157+
public function setCategory(?Category $category): self
159158
{
160159
$this->category = $category;
161160

0 commit comments

Comments
 (0)