for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\Annotation as ORM;
use Doctrine\Tests\OrmFunctionalTestCase;
/**
* @ORM\Entity
* @ORM\Table(name="DDC2084_ENTITY1")
*/
class MyEntity1
{
* @ORM\Id
* @ORM\OneToOne(targetEntity=MyEntity2::class)
* @ORM\JoinColumn(name="entity2_id", referencedColumnName="id", nullable=false)
private $entity2;
public function __construct(MyEntity2 $myEntity2)
$this->entity2 = $myEntity2;
}
public function setMyEntity2(MyEntity2 $myEntity2)
public function getMyEntity2()
return $this->entity2;
* @ORM\Table(name="DDC2084_ENTITY2")
class MyEntity2
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
private $id;
* @ORM\Column
private $value;
public function __construct($value)
$this->value = $value;
public function getId()
return $this->id;
public function getValue()
return $this->value;
public function setValue($value)