2011-02-12 36 views
0

我刚开始接触Symfony和我试图建立数据库,但我得到以下错误的数组:symfony的警告:array_merge():参数#2是不是在/ home/

./symfony doctrine:build --model 

Warning: array_merge(): Argument #2 is not an array in /home/nicky/symfony/symfony-1.4.8/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php on line 182

我在schema.yml中以下

# config/doctrine/schema.yml 
JobeetCategory: 
actAs: { Timestampable: ~ } 
columns: 
name: { type: string(255), notnull: true, unique: true } 
JobeetJob: 
actAs: { Timestampable: ~ } 
columns: 
category_id: { type: integer, notnull: true } 
type:   { type: string(255) } 
company:  { type: string(255), notnull: true } 
logo:   { type: string(255) } 
url:   { type: string(255) } 
position:  { type: string(255), notnull: true } 
location:  { type: string(255), notnull: true } 
description: { type: string(4000), notnull: true } 
how_to_apply: { type: string(4000), notnull: true } 
token:  { type: string(255), notnull: true, unique: true } 
is_public: { type: boolean, notnull: true, default: 1 } 
is_activated: { type: boolean, notnull: true, default: 0 } 
email:  { type: string(255), notnull: true } 
expires_at: { type: timestamp, notnull: true } 

感谢您的帮助!

回答

2

如果这就是您的文件实际看起来的样子,那么它不是有效的YAML。这是一种基于缩进的语言,并且您的模型名称下没有缩进。

+0

无法解析文件“/home/nicky/symfony/projectdirectory/config/doctrine/schema.yml”:YAML文件不能在第3行包含制表符作为缩进(\t actAs:{Timestampable:〜})。 – nicky 2011-02-12 23:48:09

相关问题