Пример #1
0
 /**
  * 
  * Model-specific setup.
  * 
  * @return void
  * 
  */
 protected function _setup()
 {
     parent::_setup();
     $this->_hasMany('areas');
     $this->_hasMany('nodes');
     $this->_hasOne('pref');
 }
Пример #2
0
 /**
  * 
  * Model-specific setup.
  * 
  * @return void
  * 
  */
 protected function _setup()
 {
     // chain to parent
     parent::_setup();
     $this->_belongsTo('area');
     $this->_belongsTo('area_false', array('foreign_name' => 'areas', 'where' => '0=1'));
     $this->_belongsTo('user');
     $this->_hasOne('meta');
     $this->_hasOne('meta_false', array('foreign_name' => 'metas', 'where' => '0=1'));
     $this->_hasMany('comments');
     $this->_hasMany('comments_false', array('foreign_name' => 'comments', 'where' => '0=1', 'join_flag' => true));
     $this->_hasMany('taggings');
     $this->_hasManyThrough('tags', 'taggings');
     $this->_hasManyThrough('tags_false', 'taggings', array('foreign_name' => 'tags', 'where' => '0=1'));
     $this->_hasMany('taggings_false', array('foreign_name' => 'taggings', 'where' => '0=1'));
     $this->_hasManyThrough('tags_through_false', 'taggings_false', array('foreign_name' => 'tags'));
     $this->_hasManyThrough('tags_false_through_false', 'taggings_false', array('foreign_name' => 'tags', 'where' => '0=1'));
 }
Пример #3
0
 /**
  * 
  * Model-specific setup.
  * 
  * @return void
  * 
  */
 protected function _setup()
 {
     parent::_setup();
     $this->_belongsTo('user');
     $this->_hasMany('nodes');
 }
Пример #4
0
 /**
  * 
  * Model-specific setup.
  * 
  * @return void
  * 
  */
 protected function _setup()
 {
     parent::_setup();
     $this->_belongsTo('user');
 }
Пример #5
0
 /**
  * 
  * Model-specific setup.
  * 
  * @return void
  * 
  */
 protected function _setup()
 {
     parent::_setup();
     $this->_belongsTo('node');
     $this->_belongsTo('tag');
 }
Пример #6
0
 /**
  * 
  * Model-specific setup.
  * 
  * @return void
  * 
  */
 protected function _setup()
 {
     parent::_setup();
     $this->_hasMany('taggings');
     $this->_hasManyThrough('nodes', 'taggings');
 }