yiisoft/yii2 — pull request #5752 by slavcodev (2014-10-24 13:24:31+00:00)
Title: Adding ability to change hasMany relation to hasOne

Now I write

```php
public function getOrders()
{
return $this->hasOne(Order::className(), ['id' => 'order_id']);
}

public function getLastOrder()
{
$query = $this->getOrders()->orderBy('created_at DESC');
$query->multiple = false;
return $query;
}
```

but it would be better with chain

thanks.