You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symfony FOSUserBundle versions: 2.1.2 with sympfony 4.1
Description of the problem including expected versus actual behavior:
I try to create an mapping between a user and a profile class. l don't succès to load data to the form and save it. I got the following message : The association App\Entity\Profile#user refers to the owning side field App\Entity\User#profile which does not exist.
Everything else is working perfectly (internationalization, surcharges, and so on.)
Steps to reproduce:
User.php
/**
* @ORM\OneToOne(targetEntity="Profile", inversedBy="user")
* @ORM\JoinColumn(name="profile_id", referencedColumnName="id")
*/
protected $profile;
/**
* @return mixed
*/
public function getProfile()
{
return $this->profile;
}
/**
* @param mixed $profile
*/
public function setProfile($profile): void
{
$this->profile = $profile;
}
Profile.php
/**
* @ORM\OneToOne(targetEntity="User", mappedBy="profile" )
*/
protected $user;
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user): void
{
$this->user = $user;
}
Symfony FOSUserBundle versions: 2.1.2 with sympfony 4.1
Description of the problem including expected versus actual behavior:
I try to create an mapping between a user and a profile class. l don't succès to load data to the form and save it. I got the following message :
The association App\Entity\Profile#user refers to the owning side field App\Entity\User#profile which does not exist.
Everything else is working perfectly (internationalization, surcharges, and so on.)
Steps to reproduce:
Provide logs (if relevant):
Describe the feature:
The text was updated successfully, but these errors were encountered: