Commit f83b1c50 authored by Mat's avatar Mat
Browse files

Retourne la OneToOne entre User et Utilisateur (owner)

parent 72f9a67b
......@@ -24,8 +24,7 @@ class User extends BaseUser
/**
* @var
* @ORM\OneToOne(targetEntity="PotageBundle\Entity\Utilisateur", inversedBy="user")
* @ORM\JoinColumn(name="id_utilisateur", referencedColumnName="id")
* @ORM\OneToOne(targetEntity="PotageBundle\Entity\Utilisateur", mappedBy="user")
*/
private $utilisateur;
......@@ -48,6 +47,8 @@ class User extends BaseUser
return $this->id;
}
/**
* Set utilisateur
*
......
......@@ -26,7 +26,8 @@ class Utilisateur
/**
* @var
* @ORM\OneToOne(targetEntity="PotageBundle\Entity\User", mappedBy="utilisateur")
* @ORM\OneToOne(targetEntity="PotageBundle\Entity\User", inversedBy="utilisateur")
* @ORM\JoinColumn(name="id_fosuser", referencedColumnName="id")
*/
private $user;
......@@ -86,32 +87,18 @@ class Utilisateur
{
return $this->id;
}
/**
* Set user
*
* @param User $user
*
* @return Utilisateur
*/
public function setUser(User $user = null)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* Set depot
*
* @param Depot $depot
......@@ -248,4 +235,28 @@ class Utilisateur
{
return $this->prenom;
}
/**
* Set user
*
* @param \PotageBundle\Entity\User $user
*
* @return Utilisateur
*/
public function setUser(\PotageBundle\Entity\User $user = null)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \PotageBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment