I had actually reported the wrong error. The 'user_class' entry in config.yml wasn't pointing to my own FosUser entity at the time. But when I do point it at my FosUser entity I was getting lots of errors about duplicate fields and wrong access levels to fields. I think the problems had arisen when generating FOS user entity from the command line. It had added code to some files resulting in these errors. (I had followed tutorials closely)
I got it working by removing src/FOS/ (not sure if that's advisable), and extending my FosUser entity from FOS\UserBundle\Model\User directly (rather than FOS\UserBundle\Entity\User). On Tuesday, 12 May 2015 09:41:02 UTC+1, Kevin Porter wrote: > > Hi, > > I'm new to Symfony and Doctrine. I've got the basics of both working, and > have produced pages that pull news stories from my database and display > them. So far so good, but now I've hit a brick wall. > > I am trying to get user management working now. I've followed tutorials > for FOSUserBundle and Doctrine. > > In my own app bundle I have a FosUser Entity, with doctrine annotations > specifying a table called 'fos_user'. But doctrine always tries to read > from a table called 'User' which doesn't exist. I've cleared doctrine and > symfony caches. > > My FosUser entity extends FOS\UserBundle\Entity\User, which extends > FOS\UserBundle\Model\User. I cannot find anywhere how doctrine is getting > the table name 'User'. > > I could just change my table name to 'User' to make it work but I'd rather > understand and fix the problem. > > Can anyone help? > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
