mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 06:01:35 +01:00
Formated code and optimized orm mapping
This commit is contained in:
parent
1252f41127
commit
6be1a09b30
@ -4,8 +4,6 @@ namespace App\Entity\Meta;
|
||||
|
||||
use App\Entity\AbstractEntity;
|
||||
use App\Entity\Attribut\SourceAttribut;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @todo Implement source attribut
|
||||
@ -16,14 +14,6 @@ abstract class AbstractMeta extends AbstractEntity implements MetaInterface
|
||||
{
|
||||
use SourceAttribut;
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="App\Entity\Source\AbstractSource",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="source_id", referencedColumnName="id",onDelete="CASCADE")
|
||||
*
|
||||
* @var SourceInterface
|
||||
*/
|
||||
protected $source;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
@ -6,6 +6,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Attribut\RightsAttribute;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use App\Entity\Attribut\RelationAttribut;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@ -16,6 +17,14 @@ class Law extends AbstractMeta implements LawInterface
|
||||
{
|
||||
use RightsAttribute, RelationAttribut;
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="App\Entity\Source\AbstractSource",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="source_id", referencedColumnName="id",onDelete="CASCADE")
|
||||
*
|
||||
* @var SourceInterface
|
||||
*/
|
||||
protected $source;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Right", mappedBy="law", cascade={"persist", "remove"})
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ namespace App\Entity\Meta\Relation\Parent;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use App\Entity\Meta\Relation\CreatorRelationInterface;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@ -12,6 +13,14 @@ use App\Entity\Meta\Relation\CreatorRelationInterface;
|
||||
*/
|
||||
class CreatorRelation extends AbstractParentRelation
|
||||
{
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="App\Entity\Source\AbstractSource",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="source_id", referencedColumnName="id",onDelete="CASCADE")
|
||||
*
|
||||
* @var SourceInterface
|
||||
*/
|
||||
protected $source;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="CreatorRelation",mappedBy="childs")
|
||||
*
|
||||
|
@ -88,7 +88,7 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="App\Entity\Meta\Law",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="law_id", referencedColumnName="id")
|
||||
* @ORM\JoinColumn(name="law_id", referencedColumnName="id", onDelete="CASCADE")
|
||||
*
|
||||
* @var LawInterface
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user