Answer the question
In order to leave comments, you need to log in
How to correctly describe such a connection in doctrine?
I'm trying to do many-to-many, the problem is that only one key points to the intermediate table.
That is, something like this:
I mastered the country-> city and city-> people connections, but country-> people are needed.
class Country
{
/**
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="City", mappedBy="country")
*/
private $cities;
/**
* ???????
*/
private $peoples;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question