1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/tests/Doctrine/Tests/Models/DDC2372/Traits/DDC2372AddressTrait.php
2013-04-07 16:26:05 +02:00

25 lines
554 B
PHP

<?php
namespace Doctrine\Tests\Models\DDC2372\Traits;
trait DDC2372AddressTrait
{
/**
* @OneToOne(targetEntity="Doctrine\Tests\Models\DDC2372\DDC2372Address", inversedBy="user")
* @JoinColumn(name="address_id", referencedColumnName="id")
*/
private $address;
public function getAddress()
{
return $this->address;
}
public function setAddress(Address $address)
{
if ($this->address !== $address) {
$this->address = $address;
$address->setUser($this);
}
}
}