private function extractModelFromResult($metaInstance, array $row, $offsetInResultSet)
{
$attributes = array();
$offset = $offsetInResultSet;
$hasAnyNonEmptyAttribute = false;
foreach ($metaInstance->_getFields() as $field) {
$attributes[$field] = $row[$offset];
$hasAnyNonEmptyAttribute = $hasAnyNonEmptyAttribute || $row[$offset];
$offset++;
}
return $hasAnyNonEmptyAttribute ? $metaInstance->newInstance($attributes) : null;
}