Last active
October 10, 2018 14:57
-
-
Save bastos71/8e15f69ebecf5e97dc75187d130fe109 to your computer and use it in GitHub Desktop.
With this I get an error by doctrine : "The association Advercity\AdminBundle\Entity\TaxStamp#process refers to the owning side field Advercity\AdminBundle\Entity\Process#taxStamp which does not exist."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @ORM\Entity(repositoryClass="ProcessRepository") | |
| * @ORM\InheritanceType("JOINED") | |
| * @ORM\DiscriminatorColumn(name="discr", type="string") | |
| */ | |
| class Process | |
| { | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @ORM\Entity(repositoryClass="ProcessCadasterRepository") | |
| */ | |
| class ProcessCadaster extends Process implements EntityWithTaxStampInterface | |
| { | |
| use TaxStampTrait; | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @ORM\Entity(repositoryClass="ProcessIdentityCardRepository") | |
| */ | |
| class ProcessIdentityCard extends Process implements EntityWithTaxStampInterface | |
| { | |
| use TaxStampTrait; | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @ORM\Entity(repositoryClass="ProcessPassportRepository") | |
| */ | |
| class ProcessPassport extends Process implements EntityWithTaxStampInterface | |
| { | |
| use TaxStampTrait; | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @ORM\Entity(repositoryClass="TaxStampRepository") | |
| */ | |
| class TaxStamp | |
| { | |
| /** | |
| * @ORM\OneToOne(targetEntity="Advercity\AdminBundle\Entity\Process", mappedBy="taxStamp") | |
| */ | |
| private $process; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| trait TaxStampTrait | |
| { | |
| /** | |
| * @ORM\OneToOne(targetEntity="TaxStamp", cascade={"persist"}) | |
| * @ORM\JoinColumn(name="tax_stamp_id", referencedColumnName="id") | |
| */ | |
| private $taxStamp; | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment