can we use traits to map manyToOne relationship with doctrine2?
问题 I am frequently associating a vote entity in other ones with symfony2 / doctrine 2. This is done through a manyToOne relationship. I was considering using a trait to include the association and its getters/setters in other entities but then I faced the issue that the mappedBy parameter couldn't be replaced correctly. If there is no way to give arguments to a trait, how else could I achieve my objective, knowing I can't extend another class. Example : /** * @ORM\OneToMany(targetEntity="