#6759 segregating test models into their own namespace
This commit is contained in:
parent
6ba2d1c317
commit
d831f4fd9f
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Doctrine\Tests\Models\OneToOneInverseSideLoad;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Entity()
|
||||||
|
* @Table(name="one_to_one_inverse_side_load_inverse")
|
||||||
|
*/
|
||||||
|
class InverseSide
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @Id()
|
||||||
|
* @Column(type="string")
|
||||||
|
* @GeneratedValue(strategy="NONE")
|
||||||
|
*/
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OneToOne(targetEntity=OwningSide::class, mappedBy="inverse")
|
||||||
|
*/
|
||||||
|
public $owning;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Doctrine\Tests\Models\OneToOneInverseSideLoad;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Entity()
|
||||||
|
* @Table(name="one_to_one_inverse_side_load_owning")
|
||||||
|
*/
|
||||||
|
class OwningSide
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @Id()
|
||||||
|
* @Column(type="string")
|
||||||
|
* @GeneratedValue(strategy="NONE")
|
||||||
|
*/
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Owning side
|
||||||
|
*
|
||||||
|
* @OneToOne(targetEntity=InverseSide::class, inversedBy="owning")
|
||||||
|
* @JoinColumn(nullable=false, name="inverse")
|
||||||
|
*/
|
||||||
|
public $inverse;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user