1

I just createt a Bundle FIRM/ComCollectBundle (with the name FirmComCollectBundle). Then I created a File src/FIRM/ComCollectBundle/Resources/config/doctrine/ForumUser.orm.yml with this content:

FIRMComCollectBundle\Entity\ForumUser:
  type: entity
  table: forum_users
  repositoryClass: FIRM\ComCollectBundle\Entity\ForumUserRepository
  id:
    id:
      type: integer
      generator: { strategy: AUTO }
  fields:
    name:
      type: string
      length: 30

when I now try to use the console to create entities

$ php bin/console doctrine:generate:entities FIRM\CommCollectBundle\ForumUser

I get this error:

[Doctrine\Common\Persistence\Mapping\MappingException]                       
  Invalid mapping file 'FIRM.ComCollectBundle.Entity.ForumUser.orm.yml' for cl  
  ass 'FIRM\ComCollectBundle\Entity\ForumUser'.    

The same error (about ForumUser) even appears when I try to generate entities for another bundle (AppBundle)!

1 Answer 1

1

It seems, that the length: 30 was the problem, that has to be length: '30'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.