diff --git a/lib/Cake/ORM/Association/BelongsTo.php b/lib/Cake/ORM/Association/BelongsTo.php index 3458825f6c8..6da9c1e3d44 100644 --- a/lib/Cake/ORM/Association/BelongsTo.php +++ b/lib/Cake/ORM/Association/BelongsTo.php @@ -45,7 +45,7 @@ class BelongsTo extends Association { public function foreignKey($key = null) { if ($key === null) { if ($this->_foreignKey === null) { - $this->_foreignKey = Inflector::underscore($this->target()->alias()) . '_id'; + $this->_foreignKey = Inflector::underscore($this->target()->alias()) . '_id'; } return $this->_foreignKey; }