36 lines
516 B
PHP
36 lines
516 B
PHP
<?php
|
|
|
|
namespace Doctrine\Tests\Models\Cache;
|
|
|
|
/**
|
|
* @Entity
|
|
* @Table("cache_person")
|
|
* @Cache("NONSTRICT_READ_WRITE")
|
|
*/
|
|
class Person
|
|
{
|
|
const CLASSNAME = __CLASS__;
|
|
|
|
/**
|
|
* @Id
|
|
* @GeneratedValue
|
|
* @Column(type="integer")
|
|
*/
|
|
public $id;
|
|
|
|
/**
|
|
* @Column(unique=true)
|
|
*/
|
|
public $name;
|
|
|
|
/**
|
|
* @OneToOne(targetEntity="Address", mappedBy="person")
|
|
*/
|
|
public $address;
|
|
|
|
public function __construct($name)
|
|
{
|
|
$this->name = $name;
|
|
}
|
|
}
|