silverstripe/sapphire — pull request #868 by halkyon (2012-10-11 21:08:52+00:00)
Title: BUG Fixing model not being set before populateDefaults()

In cases where a getter on a DataObject calls getComponent() or
other relational getter, $this->model won't have been set at
this point, and a fatal error is triggered.

This fixes it so $this->model is set *before* populateDefaults()
in DataObject::__construct() and the getters can operate normally.