diff --git a/application/src/Entity/Source/Combination/AbstractCombinationSource.php b/application/src/Entity/Source/Combination/AbstractCombinationSource.php index 869f568..6e59739 100644 --- a/application/src/Entity/Source/Combination/AbstractCombinationSource.php +++ b/application/src/Entity/Source/Combination/AbstractCombinationSource.php @@ -3,7 +3,17 @@ namespace App\Entity\Source\Combination; use App\Entity\Source\AbstractSource; +use Doctrine\ORM\Mapping as ORM; +/** + * @author kevinfrantz + * + * @ORM\Entity + * @ORM\Table(name="source_combination") + * @ORM\InheritanceType("JOINED") + * @ORM\DiscriminatorColumn(name="discr", type="string") + * @ORM\DiscriminatorMap({"user" = "UserSource","fullpersonname" = "FullPersonNameSource"}) + */ abstract class AbstractCombinationSource extends AbstractSource implements CombinationSourceInterface { } diff --git a/application/src/Entity/Source/Data/AbstractDataSource.php b/application/src/Entity/Source/Data/AbstractDataSource.php index 9c823c2..ae1646e 100644 --- a/application/src/Entity/Source/Data/AbstractDataSource.php +++ b/application/src/Entity/Source/Data/AbstractDataSource.php @@ -12,7 +12,7 @@ use App\Entity\Source\AbstractSource; * @ORM\Table(name="source_data") * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="discr", type="string") - * @ORM\DiscriminatorMap({"user" = "UserSource","name" = "NameSource"}) + * @ORM\DiscriminatorMap({"name" = "App\Entity\Source\Data\Name\AbstractNameSource"}) */ abstract class AbstractDataSource extends AbstractSource implements DataSourceInterface { diff --git a/application/src/Entity/Source/Data/Name/AbstractNameSource.php b/application/src/Entity/Source/Data/Name/AbstractNameSource.php index 464bbea..12aace6 100644 --- a/application/src/Entity/Source/Data/Name/AbstractNameSource.php +++ b/application/src/Entity/Source/Data/Name/AbstractNameSource.php @@ -4,7 +4,17 @@ namespace App\Entity\Source\Data\Name; use App\Entity\Source\Data\AbstractDataSource; use App\Entity\Attribut\NameAttribut; +use Doctrine\ORM\Mapping as ORM; +/** + * @author kevinfrantz + * + * @ORM\Entity + * @ORM\Table(name="source_data_name") + * @ORM\InheritanceType("JOINED") + * @ORM\DiscriminatorColumn(name="discr", type="string") + * @ORM\DiscriminatorMap({"nickname" = "NicknameSource"}) + */ abstract class AbstractNameSource extends AbstractDataSource implements NameSourceInterface { use NameAttribut; diff --git a/application/src/Entity/Source/Data/Name/NicknameSource.php b/application/src/Entity/Source/Data/Name/NicknameSource.php index ce1e528..806758b 100644 --- a/application/src/Entity/Source/Data/Name/NicknameSource.php +++ b/application/src/Entity/Source/Data/Name/NicknameSource.php @@ -8,8 +8,8 @@ use Symfony\Component\Validator\Constraints as Assert; /** * @author kevinfrantz - * @ORM\Table(name="source_data_name") - * @ORM\Entity(repositoryClass="App\Repository\NameSourceRepository") + * @ORM\Table(name="source_data_nickname") + * @ORM\Entity() */ final class NicknameSource extends AbstractNameSource implements NicknameSourceInterface { diff --git a/application/src/Entity/User.php b/application/src/Entity/User.php index 0ca753c..11ba14b 100644 --- a/application/src/Entity/User.php +++ b/application/src/Entity/User.php @@ -21,7 +21,7 @@ class User extends BaseUser implements UserInterface /** * @var UserSourceInterface - * @ORM\OneToOne(targetEntity="App\Entity\Source\Data\UserSource",cascade={"persist", "remove"}) + * @ORM\OneToOne(targetEntity="App\Entity\Source\Combination\UserSource",cascade={"persist", "remove"}) * @ORM\JoinColumn(name="source_user_id", referencedColumnName="id") */ protected $source;