laravel/laravel — Issue #118: Model has_one should return directly the object
Author: kuzeko
Created: 2011-10-15 16:20:37+00:00
State: open

Since the `has_one' is modeling a 1:1 relationship when calling the method it should return directly the object model.
This is obtained editing row 241 adding the call to the first() method :

return $this->has_one_or_many($model, $foreign_key)->first();