Skip to content

Commit

Permalink
#6613 #6614 simplifying entity definition - using auto-assigned strin…
Browse files Browse the repository at this point in the history
…g identifiers to reduce moving parts
  • Loading branch information
Ocramius committed Aug 11, 2017
1 parent 874d60d commit 594e60d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions tests/Doctrine/Tests/Models/DDC6613/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


/**
* @Entity(readOnly=true)
* @Table(name="ddc6613_phone")
*/

Expand All @@ -19,9 +18,13 @@ class Phone

/**
* @Id
* @GeneratedValue
* @GeneratedValue(strategy="NONE")
* @Column(type="integer")
*/
public $id;

public function __construct()
{
$this->id = uniqid('phone', true);
}
}
7 changes: 4 additions & 3 deletions tests/Doctrine/Tests/Models/DDC6613/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class User

/**
* @Id
* @GeneratedValue
* @Column(type="integer")
* @GeneratedValue(strategy="NONE")
* @Column(type="string")
*/
public $id;
private $id;


/**
Expand All @@ -36,6 +36,7 @@ class User
*/
public function __construct()
{
$this->id = uniqid('user', true);
$this->phones = new ArrayCollection();
}

Expand Down

0 comments on commit 594e60d

Please sign in to comment.