add a discrimnator type on onbjects

This commit is contained in:
2021-05-12 17:51:37 +02:00
parent f7a807473d
commit 91e4d585ff
17 changed files with 236 additions and 109 deletions

View File

@@ -28,6 +28,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Chill\MainBundle\Entity\Center;
use Symfony\Component\Validator\Constraints as Assert;
use Chill\MainBundle\Entity\Address;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
/**
* ThirdParty is a party recorded in the database.
@@ -38,7 +39,9 @@ use Chill\MainBundle\Entity\Address;
*
* @ORM\Table(name="chill_3party.third_party")
* @ORM\Entity(repositoryClass="Chill\ThirdPartyBundle\Repository\ThirdPartyRepository")
*
* @DiscriminatorMap(typeProperty="type", mapping={
* "thirdparty"=ThirdParty::class
*})
*/
class ThirdParty
{