I have installed the FOS\UserBundle (however I do not think the issue
lies inside the bundle) after creating the user class

class User extends BaseUser{

        /** @ORM\Id
         * @ORM\Column(type="integer")
         * @ORM\GeneratedValue(strategy="AUTO")
         */
        protected $id;

.....

I updated my schema. When I tried to add a user

php app/console fos:user:create username email password

I get the following error

[Doctrine\OR \ORMException]

Entity of type APP\BUNDLE\Entity\User is missing an assigned ID. The
identifier generation strategy for this entity requires the ID field
to be populated before EntityManager#persist() is called. If you want
automatically generated identifiers instead you need to adjust the
metadata mapping accordingly.

and sure enough the extras field in my db is set to none. All of my
other entities which auto incrementing IDs work fine. When I remove
extends BaseUser though and just have a user class the extras field is
set to auto increment as required.

At first I thought it might be something in the Bundles Mappings
overriding my mapping but there is no entry in the bundles mapping for
ID.

Any suggestions would be much appriciated

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to