I am working with FOSUserBundle to authenticate. The authentication worked, so far so good. I have a couple of extra fields which populated nicely.
I then added a Roles-table (with the according entity), where the id-field is referenced by a roleid field in the database.
However, this field is not recognized by doctrine at all. Even
php app/console doctrine:schema:update --dump-sql
doesn’t show it! Even when I rename my current table and then try to generate a create table-query, the field doesn’t show up. I also tried renaming the field, but to no luck.
My field (in the class, of course):
/*
* @var int $roleid
*
* @ManyToOne(targetEntity="Roles")
* @JoinColumn(name="roleid", referencedColumnName="id")
*/
protected $roleid;
If anyone could point me in the right direction of what is going on, I would greatly appreciate it.
Use
instead of
otherwise the annotations will not be recognized