1
0
mirror of synced 2024-12-14 15:16:04 +03:00

We now support @Id on @ManyToOne fields. Removed TODO and associated code.

This commit is contained in:
Guilherme Blanco 2011-05-14 00:53:22 -03:00
parent f4d62b317e
commit 2a7364bb18

View File

@ -44,17 +44,12 @@ class DDC192Phonenumber
*/ */
protected $phone; protected $phone;
/**
* @Id @Column(name="userId", type="integer")
*/
protected $userId;
/** /**
* @Id * @Id
* @ManyToOne(targetEntity="DDC192User") * @ManyToOne(targetEntity="DDC192User")
* @JoinColumn(name="userId", referencedColumnName="id") * @JoinColumn(name="userId", referencedColumnName="id")
*/ */
protected $User; // Id on this docblock is ignored! protected $User;
public function setPhone($value) { $this->phone = $value; } public function setPhone($value) { $this->phone = $value; }
@ -64,7 +59,6 @@ class DDC192Phonenumber
public function setUser(User $user) public function setUser(User $user)
{ {
$this->User = $user; $this->User = $user;
$this->userId = $user->getId(); // TODO: Remove once ManyToOne supports Id annotation
} }
public function getUser() { return $this->User; } public function getUser() { return $this->User; }