Doctrine 500 |内部服务器错误|条令|记录|未知属性异常未知记录属性

Doctrine 500 |内部服务器错误|条令|记录|未知属性异常未知记录属性,doctrine,symfony-1.4,Doctrine,Symfony 1.4,我将在线站点复制到localhost。登录后出现以下错误。 但是在线服务器在工作 500 |内部服务器错误|条令|记录|未知属性异常 “层”上的未知记录属性/相关组件“id” 请帮助解决问题 这是schema.yml ########## # USER ########## Personal: columns: user_id: { type: integer, notnull: true } full_name: {

我将在线站点复制到localhost。登录后出现以下错误。 但是在线服务器在工作

500 |内部服务器错误|条令|记录|未知属性异常 “层”上的未知记录属性/相关组件“id”

请帮助解决问题

这是schema.yml

##########
# USER
##########
Personal:
  columns:
    user_id:                { type: integer, notnull: true }
    full_name:              { type: string(255), notnull: true }
    sex:                    { type: integer(1), notnull: true } #use constant value, 1 = Male, 2 = Female
    birth_date:             { type: date, notnull: true }
    relationship_status:    { type: integer(1), notnull: true } #use constant value, 1 = Single, 2 = In a relationship, 3 = Engaged, 4 = Married, 5 = It's complicated, 6 = In an open relationship, 7 = Widowed, 8 = Separated, 9 = Divorced
    country_id:             { type: integer }
    zone_id:                { type: integer }
    occupation:             { type: string(255) }
    education:              { type: string(255) }
    hobbies:                { type: string(255) }
    professional_interests: { type: string(255) }
    about_me:               { type: string(1000) }
    alias:                  { type: string(255), notnull: true }
    primary_album_id:       { type: integer }
    primary_layer_id:       { type: integer }
    profile_picture_id:     { type: integer }
    alias_picture_id:       { type: integer }
  relations:
    User:           { class: sfGuardUser, local: user_id, foreign: id, onDelete: CASCADE }
    Country:        { local: country_id, foreign: id, onDelete: SET NULL }
    Zone:           { local: zone_id, foreign: id, onDelete: SET NULL }
    PrimaryAlbum:   { class: Album, local: primary_album_id, onDelete: SET NULL }
    PrimaryLayer:   { class: Layer, local: primary_layer_id, onDelete: SET NULL }
    ProfilePicture: { class: Picture, local: profile_picture_id, onDelete: SET NULL }
    AliasPicture:   { class: Picture, local: alias_picture_id, onDelete: SET NULL }



   Layer:
  columns:
    id:        {type:  integer, notnull:  true } 
    personal_id:     { type: integer, notnull: true }
    name:            { type: string(255), notnull: true }
    picture_id:  { type: integer, primary: true }

    privacy_setting: { type: string(64), notnull: true }  
  relations:
    Personal: { local: personal_id, foreign: id, onDelete: CASCADE }



    abstract class BasePersonal extends sfDoctrineRecord
       {
        public function setTableDefinition()
        {
            $this->setTableName('personal');
       $this->hasColumn('user_id', 'integer', null, array(
         'type' => 'integer',
         'notnull' => true,
         ));

             $this->hasColumn('primary_layer_id', 'integer', null, array(
         'type' => 'integer',
         ));



   public function setUp()
   {
    parent::setUp();
        $this->hasOne('Layer as PrimaryLayer', array(
         'local' => 'primary_layer_id',
         'foreign' => 'id',
         'onDelete' => 'SET NULL'));

       $this->hasMany('Layer', array(
         'local' => 'id',
         'foreign' => 'personal_id'));



           abstract class BaseLayer extends sfDoctrineRecord
            {
           public function setTableDefinition()
         {
              $this->setTableName('layer');
              $this->hasColumn('personal_id', 'integer', null, array(
               'type' => 'integer',
              'notnull' => true,
                ));


       public function setUp()
         {
             parent::setUp();
             $this->hasOne('Personal', array(
         'local' => 'personal_id',
         'foreign' => 'id',
         'onDelete' => 'CASCADE'));

任何人,帮帮我

删除schema.yml中的这一行,并让Doctrine执行主键

id:        {type:  integer, notnull:  true } 

嗨,j0k,你的评论对我很有用。请告诉我。我上面代码中的问题是什么。在你的评论前两天,我解决了我的问题。谢谢。嗨,jOk,我已经删除了那一行,但同样的错误也发生了。你是否执行了
/symfony cc
/symfony原则:build--model
?嗨,jOk,我执行了symfony原则:build--model,提交时出现以下错误。无法分析文件:28 PrimaryLayer:{class:Layer,local:primary\u Layer\u id,onDelete:SET NULL}你好,我检查了它apache错误日志此错误提交文件不存在:C:/wamp/www/public\u html/web/sf,referer:tell em solution.你忘了声明你的
别名/sf