mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 01:09:41 +00:00 
			
		
		
		
	Optimized ORM Modell
This commit is contained in:
		| @@ -6,10 +6,13 @@ use App\Entity\Attribut\NodeAttribut; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  *  | ||||
|  * @author kevinfrantz | ||||
|  * @see https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/inheritance-mapping.html | ||||
|  *         | ||||
|  * @ORM\Entity | ||||
|  * @ORM\InheritanceType("JOINED") | ||||
|  * @ORM\DiscriminatorColumn(name="discr", type="string") | ||||
|  * @ORM\DiscriminatorMap({"user" = "User"})        | ||||
|  */ | ||||
| abstract class AbstractSource implements SourceInterface | ||||
| {   | ||||
|   | ||||
| @@ -10,6 +10,8 @@ use App\Entity\SourceInterface; | ||||
|  */ | ||||
| trait SourceAttribut { | ||||
|     /** | ||||
|      * @ORM\OneToOne(targetEntity="AbstractSource") | ||||
|      * @ORM\JoinColumn(name="source_id", referencedColumnName="id") | ||||
|      * @var SourceInterface | ||||
|      */ | ||||
|     protected $source; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user