Answer the question
In order to leave comments, you need to log in
Trait categories in Doctrine and symfony2, what about DiscriminatorColumn?
I want to make a category trait that I will use in several Entities. I can not find how to resolve the Discriminator.
Source at the moment:
Trait CollectionTrait
{
/**
* @ORM\ManyToMany(targetEntity="DesignerBundle\Entity\Collection")
* @ORM\JoinTable(
* name="entities_to_collections",
* joinColumns={@ORM\JoinColumn(name="entity_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="collection_id", referencedColumnName="id")}
* )
*/
protected $collections;
...........
...........
}
Answer the question
In order to leave comments, you need to log in
Trait CollectionTrait
{
/**
* @ORM\ManyToMany(targetEntity="DesignerBundle\Entity\Collection")
* @ORM\JoinTable(
* joinColumns={@ORM\JoinColumn(referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(referencedColumnName="id")}
* )
*/
protected $collections;
...........
...........
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question