Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,19 @@ Whoa! You now have a new ``src/Entity/Product.php`` file::
use App\Repository\ProductRepository;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: ProductRepository::class)]
#[ORM\Entity(repositoryClass: ProductRepository::class)]
class Product
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private int $id;
private ?int $id = null;

#[ORM\Column(length: 255)]
private string $name;
private ?string $name = null;

#[ORM\Column]
private int $price;
private ?int $price = null;

public function getId(): ?int
{
Expand Down