2012-04-10 10 views
-4

私はローカルサイトにローカルサイトをコピーしました。ログイン後、次のエラーが発生していました。 しかし、オンラインサーバーはgudを使用しています。500 |内部サーバーエラー| Doctrine_Record_UnknownPropertyException不明なレコードプロパティ

500 |内部サーバーエラー| Doctrine_Record_UnknownPropertyException 不明なレコードプロパティ/関連コンポーネント "レイヤー"上の "id"

plz何が問題なのですか?

これは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')); 

任意の体にお役立てください。

+0

こんにちはj0k、私は上記の私の上記code.tyo問題のwhat.what私の問題code.what私のproblem.thanksを解決する前に問題を教えてください。 – vk1314376

答えて

1

あなたのschema.ymlでこの行を削除し、Doctrineを主キーにしましょう。

id:  {type: integer, notnull: true } 
+0

こんにちはjOk、私はすでにその行を削除したが、同じエラーが来ていた。 – vk1314376

+0

'./symfony cc'と' ./symfony doctrine:build --model'を実行しましたか? – j0k

+0

こんにちはjok、私はsymfonyのdoctrineをしました:ビルド - モデル、次のエラーはファイルを解析するcomming.unableでした:28 PrimaryLayer:{クラス:レイヤ、ローカル:primary_layer_id、onDelete:SET NULL} – vk1314376

関連する問題