public function _createSelect(array $filter, array $sort)
    {
        $select = parent::_createSelect($filter, $sort);

        $config = $select->getAdapter()->getConfig();
        if (isset($config['dbname'])) {
            $constraint = $select->getAdapter()->quoteInto(' AND TABLE_SCHEMA=?', $config['dbname']);
        } else {
            $constraint = '';
        }
        $select->joinLeft('INFORMATION_SCHEMA.TABLES', "table_name  = convert(concat_ws('_','gems__orf_', REPLACE(gof_form_id,'.','_'),gof_form_version) USING utf8)" . $constraint, array('TABLE_ROWS'));
        return $select;
    }