Merge pull request #2462 from ajshort/has-many-list-foreign-getter

Add a getter for the HasManyList foreign key.
This commit is contained in:
Will Rossiter 2013-09-26 23:06:46 -07:00
commit 84cedcda44

View File

@ -25,7 +25,16 @@ class HasManyList extends RelationList {
$this->foreignKey = $foreignKey;
}
/**
* Gets the field name which holds the related object ID.
*
* @return string
*/
public function getForeignKey() {
return $this->foreignKey;
}
protected function foreignIDFilter($id = null) {
if ($id === null) $id = $this->getForeignID();