コード例 #1
0
 public function testHasRelationFields()
 {
     $table = new ModelTable('table');
     $this->assertFalse($table->hasRelationFields());
     $table->addField(new HasManyField('field', 'model'));
     $this->assertTrue($table->hasRelationFields());
 }
コード例 #2
0
ファイル: ModelMeta.php プロジェクト: BGCX261/zibo-svn-to-git
 /**
  * Gets whether this model has relation fields or only property fields
  * @return boolean True when the model has relation fields, false otherwise
  */
 public function hasRelations()
 {
     return $this->table->hasRelationFields();
 }