We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7ace09c + 32d50e9 commit 52672e9Copy full SHA for 52672e9
doctrine.rst
@@ -135,19 +135,19 @@ Whoa! You now have a new ``src/Entity/Product.php`` file::
135
use App\Repository\ProductRepository;
136
use Doctrine\ORM\Mapping as ORM;
137
138
- #[ORM\Entity(repositoryClass: ProductRepository::class)]
+ #[ORM\Entity(repositoryClass: ProductRepository::class)]
139
class Product
140
{
141
#[ORM\Id]
142
#[ORM\GeneratedValue]
143
#[ORM\Column]
144
- private int $id;
+ private ?int $id = null;
145
146
#[ORM\Column(length: 255)]
147
- private string $name;
+ private ?string $name = null;
148
149
150
- private int $price;
+ private ?int $price = null;
151
152
public function getId(): ?int
153
0 commit comments