/** * 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(); }
/** * @expectedException \Dewdrop\Exception */ public function testUnavailableOptionPairsReferenceThrowsException() { $relationship = new Relationship($this->table, 'dewdrop_test_fruits_eaten_by_animals'); $relationship->setXrefReferenceColumnName('fafafafa'); $relationship->getOptionPairsReference(); }