php - Symfony2 Jobeet tutorial day 3 error invalid mapping -
when generate bundle entities code
php app/console doctrine:generate:entities ensjobeetbundle
i'm getting error
[doctrine\common\persistence\mapping\mappingexception] invalid mapping file 'ens.jobeetbundle.entity.affiliate.orm.yml' class 'ens\jobeetbundle\entity\affiliate'.
this affiliate.orm.yml file:
ens\jobeetbundle\entity\affiliate: type: entity table: affiliate id: id: type: integer generator: { strategy: auto } fields: url: type: string length: 255 email: type: string length: 255 unique: true token: type: string length: 255 created_at: type: datetime onetomany: category_affiliates: targetentity: categoryaffiliate mappedby: affiliate lifecyclecallbacks: prepersist: [ setcreatedatvalue ]
try opening file in text editor, , replacing " " " " globally.
my colleague having exact same issue on same file, , turns out problem file using other spaces spaces. file(1)
showed file utf-8 unicode text rather plain ascii.
i believe may caused source of copy + paste using different space characters.
Comments
Post a Comment