I have 2 modules.
Config with ConfigEntity and Reporting with ReportingEntity
Those entities have a oneToManyRelation:
class Config
{
public function __construct()
{
$this->reportings = new ArrayCollection();
}
/**
* @ORM\OneToMany(targetEntity="Reporting\Entity\ConfigReporting",
* mappedBy="config", cascade={"persist"}, orphanRemoval=true)
*/
protected $reportings;
}
class ConfigReporting
{
/**
* @var int|null
* @ORM\ManyToOne(targetEntity="Config\Entity\Config", inversedBy="reportings")
* @ORM\JoinColumn(name="config", referencedColumnName="idConfig", onDelete="CASCADE")
*/
protected $config;
}
My module Reporting depends on Config's module to work. But with this doctrine's mapping, do i have a circular dependancy ?
If yes, do i have to declare the Reporting entity into Config module ?