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
namespace App\Entity;
use App\Entity\attribut\IdAttribut;
use App\Entity\attribut\NodeAttribut;
use App\Entity\Attribut\IdAttribut;
use App\Entity\Attribut\NodeAttribut;
use Doctrine\ORM\Mapping as ORM;
/**
*

View File

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

View File

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

View File

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

View File

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

View File

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