Merge pull request #3257 from wallabag/fix-mapping-entities

Fixed mapping entities
This commit is contained in:
Jérémy Benoist 2017-07-03 17:15:45 +02:00 committed by GitHub
commit 896f981ff5
2 changed files with 8 additions and 1 deletions

View file

@ -57,7 +57,7 @@ class SiteCredential
private $createdAt; private $createdAt;
/** /**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="site_credentials") * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="siteCredentials")
*/ */
private $user; private $user;

View file

@ -92,6 +92,13 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
*/ */
protected $config; protected $config;
/**
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\SiteCredential", mappedBy="user", cascade={"remove"})
*/
protected $siteCredentials;
/** /**
* @var ArrayCollection * @var ArrayCollection
* *