Updated Doctrine Entities

This commit is contained in:
Kevin Frantz 2018-10-03 16:48:16 +02:00
parent eb77157e4c
commit 6f20be38c9
5 changed files with 7 additions and 9 deletions

View File

@ -27,7 +27,7 @@ class Node extends AbstractEntity implements NodeInterface
ChildsAttribut; ChildsAttribut;
/** /**
* @ORM\OneToOne(targetEntity="AbstractSource",cascade={"persist", "remove"}) * @ORM\OneToOne(targetEntity="App\Entity\Source\AbstractSource",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="source_id", referencedColumnName="id") * @ORM\JoinColumn(name="source_id", referencedColumnName="id")
* *
* @var SourceInterface * @var SourceInterface

View File

@ -76,7 +76,7 @@ class Right extends AbstractEntity implements RightInterface
protected $type; protected $type;
/** /**
* @ORM\OneToOne(targetEntity="AbstractOperation",cascade={"persist"}) * @ORM\OneToOne(targetEntity="App\Entity\Source\Operation\AbstractOperation",cascade={"persist"})
* @ORM\JoinColumn(name="operation_id", referencedColumnName="id",nullable=true) * @ORM\JoinColumn(name="operation_id", referencedColumnName="id",nullable=true)
* *
* @var OperationInterface * @var OperationInterface

View File

@ -5,7 +5,6 @@ namespace App\Entity\Source;
use App\Entity\Attribut\NodeAttribut; use App\Entity\Attribut\NodeAttribut;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Exclude; use JMS\Serializer\Annotation\Exclude;
use App\Entity\Source\SourceInterface;
use App\Entity\NodeInterface; use App\Entity\NodeInterface;
use App\Entity\AbstractEntity; use App\Entity\AbstractEntity;
@ -25,7 +24,7 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface
/** /**
* @var NodeInterface * @var NodeInterface
* @ORM\OneToOne(targetEntity="Node",cascade={"persist", "remove"}) * @ORM\OneToOne(targetEntity="App\Entity\Node",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="node_id", referencedColumnName="id") * @ORM\JoinColumn(name="node_id", referencedColumnName="id")
* @Exclude * @Exclude
*/ */

View File

@ -6,8 +6,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
use App\Entity\Attribut\UserAttribut; use App\Entity\Attribut\UserAttribut;
use App\Entity\Attribut\NameSourceAttribut; use App\Entity\Attribut\NameSourceAttribut;
use App\Entity\Source\UserSourceInterface; use App\Entity\UserInterface;
use App\Entity\Source\NameSourceInterface;
/** /**
* @author kevinfrantz * @author kevinfrantz
@ -19,10 +18,10 @@ class UserSource extends AbstractSource implements UserSourceInterface
use UserAttribut,NameSourceAttribut; use UserAttribut,NameSourceAttribut;
/** /**
* @ORM\OneToOne(targetEntity="User",cascade={"persist", "remove"}) * @ORM\OneToOne(targetEntity="App\Entity\User",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id") * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
* *
* @var User * @var UserInterface
*/ */
protected $user; protected $user;

View File

@ -21,7 +21,7 @@ class User extends BaseUser implements UserInterface
/** /**
* @var UserSourceInterface * @var UserSourceInterface
* @ORM\OneToOne(targetEntity="UserSource",cascade={"persist", "remove"}) * @ORM\OneToOne(targetEntity="App\Entity\Source\UserSource",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="source_user_id", referencedColumnName="id") * @ORM\JoinColumn(name="source_user_id", referencedColumnName="id")
*/ */
protected $source; protected $source;