当我运行这个命令时php app/console doctrine:generate:form AcmeMyBundle:StudentUser
,我得到这个错误:
[Gedmo\Exception\InvalidMappingException]
Cannot find Tree type for class: Sylius\Bundle\CoreBundle\Model\Taxon
任何想法?
编辑:
好的,我不认为该错误与 StudentUser 有关系,因为所有实体都相同:
namespace APP\Bundle\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use PUGX\MultiUserBundle\Validator\Constraints\UniqueEntity;
use Sylius\Bundle\CoreBundle\Model\User;
/**
* @ORM\Entity(repositoryClass="App\Bundle\FrontBundle\Entity\UserRepository")
* @ORM\Table(name="sylius_user_student")
* @UniqueEntity(fields = "username", targetClass = "Sylius\Bundle\CoreBundle\Model\User", message="fos_user.username.already_used")
* @UniqueEntity(fields = "email", targetClass = "Sylius\Bundle\CoreBundle\Model\User", message="fos_user.email.already_used")
*/
class StudentUser extends User
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="package_name", type="string", length=100)
*/
protected $package_name;
/**
* @var string
*
* @ORM\Column(name="students_available", type="string", length=100)
*/
protected $studens_available;
……