I have this piece of code inside an Entity:
/**
* @ORM\ManyToOne(targetEntity="Centers")
* @ORM\JoinColumn(name="center_id", referencedColumnName="id")
* @ORM\Column(type="string", length=36, name="center_id")
*/
protected $centerId;
However, schema:update says that all is in sync. Even changing Centers to some other inexistent word, produces no error.
Please delete the last line of annotation doctrine like this and change $centerId by $center (there is object an object) :
/**
* @ORM\ManyToOne(targetEntity="Centers")
* @ORM\JoinColumn(name="center_id", referencedColumnName="id")
*/
protected $center;
Clear cache and run your command.
Tell me if this solved your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With