“Class XXX is not a valid entity or mapped super class” after moving the class in the filesystem

前端 未结 12 1175
悲哀的现实
悲哀的现实 2020-12-01 08:51

I had an entity class in Aib\\PlatformBundle\\Entity\\User.php

I had no problems trying to create its form class through

php app/ console doc

12条回答
  •  一向
    一向 (楼主)
    2020-12-01 09:34

    Had this problem - don't forget the annotation * @ORM\Entity like below:

    /**
     * Powma\ServiceBundle\Entity\User
     *
     * @ORM\Entity
     * @ORM\Table(name="users")
     */
    

提交回复
热议问题