Fixed belongs_to primary key bug.

This commit is contained in:
Taylor Otwell
2012-04-26 11:25:47 -05:00
parent ca06582369
commit 86fce099b3
3 changed files with 6 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ class Belongs_To extends Relationship {
*/
protected function constrain()
{
$this->table->where($this->base->key(), '=', $this->foreign_value());
$this->table->where($this->model->key(), '=', $this->foreign_value());
}
/**