예제 #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
 /**
  * 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();
 }