Unable to find the object manager associated with an entity of class “SomeBundle\Folder\SomeClass”

后端 未结 1 1100
一整个雨季
一整个雨季 2021-01-24 12:44

Using Symfony 2.7, I am trying to create a user registration form. I\'ve used Symfony\'s own guide for this, and the form is rendered and fillable.

When I fill in the fo

相关标签:
1条回答
  • 2021-01-24 13:17

    I think unless you specifically map a directory in your config, doctrine is going to look in YourBundle/Entity - this is where your User.php example diverges from the cookbook recipe.

    If you want to change this you'll need to specify it explicitly as per the documentation

    Alternatively just shift your User model to \Entity instead of \Models and I think it'll be OK.

    0 讨论(0)
提交回复
热议问题