2017-08-11 13:46:21 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* User: Uladzimir Struts <Sysaninster@gmail.com>
|
|
|
|
* Date: 11.08.2017
|
|
|
|
* Time: 13:12
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Doctrine\Tests\Models\DDC6613;
|
|
|
|
|
|
|
|
|
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Entity()
|
|
|
|
* @Table(name="ddc6613_user")
|
|
|
|
*/
|
|
|
|
class User
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Id
|
2017-08-11 14:19:01 +02:00
|
|
|
* @GeneratedValue(strategy="NONE")
|
|
|
|
* @Column(type="string")
|
2017-08-11 13:46:21 +03:00
|
|
|
*/
|
2017-08-11 14:19:01 +02:00
|
|
|
private $id;
|
2017-08-11 13:46:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ManyToMany(targetEntity="Phone", fetch="LAZY", cascade={"remove", "detach"})
|
|
|
|
*/
|
|
|
|
public $phones;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* User constructor.
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
2017-08-11 14:19:01 +02:00
|
|
|
$this->id = uniqid('user', true);
|
2017-08-11 13:46:21 +03:00
|
|
|
$this->phones = new ArrayCollection();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|