I'm searching why I get an error with my mapping but, I really don't see. I red some issues in stack but it doesn't work for me.
The error : The association CTC\Bundle\UserBundle\Entity\Address#addressType refers to the inverse side field CTC\Bundle\AdminBundle\Entity\AddressType#addresses which does not exist.
Secondly, I also wonder me why when I use my "doctrine:generate:entities ...", that doesn't give me the getter and setter for addresses but well for addressType.
Here is my mapping code :
class AddressType
...
/*
* @var array
*
* @ORM\OneToMany(targetEntity="CTC\Bundle\UserBundle\Entity\Address", mappedBy="addressType")
*
*/
private $addresses;
public function __construct()
{
$this->addresses = new ArrayCollection();
}
...
Class Address
/**
* @ORM\ManyToOne(targetEntity="CTC\Bundle\AdminBundle\Entity\AddressType", inversedBy="addresses")
* @ORM\JoinColumn(name="addressTypeID", referencedColumnName="AddressTypeID")
*/
private $addressType;
Any help would be very appreciate.