I'm trying to add Doctrine on top of an existing database. I let Doctrine generate annotated entities and adjusted from there. When I try to load the entity below I get the error PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Property Users\\User::$resellerID does not exist'
class User
{
/* ... */
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToOne(targetEntity="\Resellers\Reseller")
* @ORM\JoinTable(name="reseller",
* joinColumns={
* @ORM\JoinColumn(name="resellerID", referencedColumnName="resellerID")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="resellerID", referencedColumnName="resellerID")
* }
* )
*/
private $reseller;
/* ... */
}
Both the user
and reseller
tables have resellerID
columns. My understanding is that for joining ID columns you don't add the ID columns as properties in the entity class. So what's causing the ReflectionException?