Optimized Entity Draft

This commit is contained in:
Kevin Frantz 2018-09-06 14:03:08 +02:00
parent 3d42526698
commit f9e44deac4
6 changed files with 15 additions and 11 deletions

View File

@ -1,8 +1,9 @@
<?php <?php
namespace App\Entity; namespace App\Entity;
use App\Entity\attribut\IdAttribut; use App\Entity\Attribut\IdAttribut;
use App\Entity\attribut\NodeAttribut; use App\Entity\Attribut\NodeAttribut;
use Doctrine\ORM\Mapping as ORM;
/** /**
* *

View File

@ -11,8 +11,8 @@ use App\Entity\NodeInterface;
trait NodeAttribut{ trait NodeAttribut{
/** /**
* @var NodeInterface * @var NodeInterface
* @OneToOne(targetEntity="Node") * @ORM\OneToOne(targetEntity="Node")
* @JoinColumn(name="source", referencedColumnName="id") * @ORM\JoinColumn(name="source", referencedColumnName="id")
*/ */
protected $node; protected $node;

View File

@ -1,5 +1,5 @@
<?php <?php
namespace Entity\Attribut; namespace App\Entity\Attribut;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\NodeInterface; use App\Entity\NodeInterface;

View File

@ -1,15 +1,17 @@
<?php <?php
namespace App\Entity; namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\attribut\IdAttribut; use App\Entity\Attribut\IdAttribut;
use App\Entity\attribut\SourceAttribut; use App\Entity\Attribut\SourceAttribut;
use Entity\attribut\ParentAttribut; use App\Entity\Attribut\ParentAttribut;
/** /**
* *
* @author kevinfrantz * @author kevinfrantz
* * @ORM\Table(name="node")
* @ORM\Entity(repositoryClass="App\Repository\NodeRepository")
*/ */
class Node implements NodeInterface class Node implements NodeInterface
{ {

View File

@ -1,8 +1,8 @@
<?php <?php
namespace App\Entity; namespace App\Entity;
use App\Entity\attribut\NodeAttributInterface; use App\Entity\Attribut\NodeAttributInterface;
use App\Entity\attribut\IdAttributInterface; use App\Entity\Attribut\IdAttributInterface;
/** /**
* *

View File

@ -2,6 +2,7 @@
namespace App\Entity; namespace App\Entity;
use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserInterface;
use Doctrine\ORM\Mapping as ORM;
/** /**
* *
* @author kevinfrantz * @author kevinfrantz