Exemplo n.º 1
0
 /**
  * Get the reference that can be used to retrieve option pairs.  How we retrieve
  * this will vary for one-to-many vs many-to-many contexts.  In the case of
  * many-to-many fields, we grab it from the relationship definition rather than
  * the table metadata.
  *
  * @return array
  */
 public function getOptionPairsReference()
 {
     return $this->manyToManyRelationship->getOptionPairsReference();
 }
Exemplo n.º 2
0
 /**
  * @expectedException \Dewdrop\Exception
  */
 public function testUnavailableOptionPairsReferenceThrowsException()
 {
     $relationship = new Relationship($this->table, 'dewdrop_test_fruits_eaten_by_animals');
     $relationship->setXrefReferenceColumnName('fafafafa');
     $relationship->getOptionPairsReference();
 }