#6613 #6614 simplifying entity definition - using auto-assigned string identifiers to reduce moving parts
This commit is contained in:
parent
874d60d8c7
commit
594e60d3f7
@ -10,7 +10,6 @@ namespace Doctrine\Tests\Models\DDC6613;
|
||||
|
||||
|
||||
/**
|
||||
* @Entity(readOnly=true)
|
||||
* @Table(name="ddc6613_phone")
|
||||
*/
|
||||
|
||||
@ -19,9 +18,13 @@ class Phone
|
||||
|
||||
/**
|
||||
* @Id
|
||||
* @GeneratedValue
|
||||
* @GeneratedValue(strategy="NONE")
|
||||
* @Column(type="integer")
|
||||
*/
|
||||
public $id;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->id = uniqid('phone', true);
|
||||
}
|
||||
}
|
@ -20,10 +20,10 @@ class User
|
||||
|
||||
/**
|
||||
* @Id
|
||||
* @GeneratedValue
|
||||
* @Column(type="integer")
|
||||
* @GeneratedValue(strategy="NONE")
|
||||
* @Column(type="string")
|
||||
*/
|
||||
public $id;
|
||||
private $id;
|
||||
|
||||
|
||||
/**
|
||||
@ -36,6 +36,7 @@ class User
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->id = uniqid('user', true);
|
||||
$this->phones = new ArrayCollection();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user