parent
112a402016
commit
625f792290
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* User: Uladzimir Struts <Sysaninster@gmail.com>
|
||||
* Date: 11.08.2017
|
||||
* Time: 13:12
|
||||
*/
|
||||
|
||||
namespace Doctrine\Tests\Models\DDC6613;
|
||||
|
||||
|
||||
/**
|
||||
* @Table(name="ddc6613_phone")
|
||||
*/
|
||||
|
||||
class Phone
|
||||
{
|
||||
|
||||
/**
|
||||
* @Id
|
||||
* @GeneratedValue(strategy="NONE")
|
||||
* @Column(type="integer")
|
||||
*/
|
||||
public $id;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->id = uniqid('phone', true);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
<?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
|
||||
* @GeneratedValue(strategy="NONE")
|
||||
* @Column(type="string")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
|
||||
/**
|
||||
* @ManyToMany(targetEntity="Phone", fetch="LAZY", cascade={"remove", "detach"})
|
||||
*/
|
||||
public $phones;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->id = uniqid('user', true);
|
||||
$this->phones = new ArrayCollection();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user