public function testShouldUseEagerLoadingAndDetectHasOne()
{
$rawly = Robot::findFirstById(1);
$rawly->purpose;
$eagerly = Loader::fromModel(Robot::findFirstById(1), 'Purpose');
$this->assertTrue(property_exists($eagerly, 'purpose'));
$this->assertInstanceOf('Phalcon\\Test\\Mvc\\Model\\EagerLoading\\Stubs\\Purpose', $eagerly->purpose);
$this->assertEquals($rawly->purpose->readAttribute('id'), $eagerly->purpose->readAttribute('id'));
}