Edit file File name : CustomerComment.php Content :<?php declare(strict_types=1); /* * This file is part of the Kimai time-tracking app. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity() * @ORM\Table(name="kimai2_customers_comments", * indexes={ * @ORM\Index(columns={"customer_id"}) * } * ) */ class CustomerComment implements CommentInterface { use CommentTableTypeTrait; /** * @var Customer * * @ORM\ManyToOne(targetEntity="App\Entity\Customer") * @ORM\JoinColumn(onDelete="CASCADE", nullable=false) * @Assert\NotNull() */ private $customer; public function setCustomer(Customer $customer): CustomerComment { $this->customer = $customer; return $this; } public function getCustomer(): ?Customer { return $this->customer; } } Save