Référencement inverse inexistant
Bonjour,
J'ai deux entités liées : une entité Vehicle et une entité Fuel. Un véhicule possède un type de carburant. Voici les propriétés concernées dans chaque entité :
Dans Vehicle
Code:
1 2 3 4 5 6
|
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Fuel", inversedBy="vehicules")
* @ORM\JoinColumn(nullable=false)
*/
private $fuel; |
Dans Fuel :
Code:
1 2 3 4 5
|
/**
* @ORM\OneToMany(targetEntity="App\Entity\Vehicle", mappedBy="fuel")
*/
private $vehicles; |
Dans le profiler, voici les deux erreurs que je trouve :
Citation:
App\Entity\Vehicle
The association App\Entity\Vehicle#fuel refers to the inverse side field App\Entity\Fuel#vehicules which does not exist.
Citation:
App\Entity\Fuel
The mappings App\Entity\Fuel#vehicles and App\Entity\Vehicle#fuel are inconsistent with each other.
Quelqu'un aurait une idée de leur provenance?
Merci d'avance pour votre aide!