Symfony3 中的学说无效映射文件



我只是创建了一个Bundle FIRM/ComCollectBundle(名称为FirmComCollectBundle)。然后我创建了一个包含以下内容的文件src/FIRM/ComCollectBundle/Resources/config/doctrine/ForumUser.orm.yml:

FIRMComCollectBundleEntityForumUser:
  type: entity
  table: forum_users
  repositoryClass: FIRMComCollectBundleEntityForumUserRepository
  id:
    id:
      type: integer
      generator: { strategy: AUTO }
  fields:
    name:
      type: string
      length: 30

当我现在尝试使用控制台创建实体时

$ php bin/console doctrine:generate:entities FIRMCommCollectBundleForumUser

我收到此错误:

[DoctrineCommonPersistenceMappingMappingException]                       
  Invalid mapping file 'FIRM.ComCollectBundle.Entity.ForumUser.orm.yml' for cl  
  ass 'FIRMComCollectBundleEntityForumUser'.    

当我尝试为另一个捆绑包(AppBundle)生成实体时,甚至会出现相同的错误(关于论坛用户)!

似乎,length: 30是问题所在,必须length: '30'

最新更新