public function setUp() { parent::setUp(); $this->hasOne('QA as ReplyTo', array('local' => 'reply_id', 'foreign' => 'id')); $this->hasOne('Question', array('local' => 'id', 'foreign' => 'best_id')); $this->hasMany('Question as Branches', array('local' => 'id', 'foreign' => 'origin_id')); }
public function setUp() { parent::setUp(); $this->hasOne('Answer as Best', array('local' => 'best_id', 'foreign' => 'id')); $this->hasOne('Answer as Origin', array('local' => 'origin_id', 'foreign' => 'id')); $this->hasMany('Question as Related', array('refClass' => 'QuestionRelation', 'local' => 'from_id', 'foreign' => 'to_id', 'equal' => true)); $this->hasMany('Tag as Tags', array('refClass' => 'QuestionTag', 'local' => 'question_id', 'foreign' => 'tag_id')); }