'Loads records from the resource, applying the current filters,
and stores them in the instance.
@param fields: list of field names to include
@param skip: list of field names to skip
@param start: the index of the first record to load
@param limit: the maximum number of records to load
@param orderby: orderby-expression for the query
@param virtual: whether to load virtual fields or not
@param cacheable: don\'t define Row actions like update_record
or delete_record (faster, and the record can
be cached)
@return: the records as list of Rows'

def load(self, fields=None, skip=None, start=None, limit=None, orderby=None, virtual=True, cacheable=False):

    table = self.table
    tablename = self.tablename
    UID = current.xml.UID
    load_uids = hasattr(table, UID)
    if (not skip):
        skip = tuple()
    if (fields or skip):
        s3 = current.response.s3
        if ('all_meta_fields' in s3):
            meta_fields = s3.all_meta_fields
        else:
            meta_fields = s3.all_meta_fields = s3_all_meta_field_names()
        s3db = current.s3db
    qfields = [table._id.name, UID]
    append = qfields.append
    for f in table.fields:
        if ((tablename == 'gis_location') and ((f == 'the_geom') or ((f == 'wkt') and (current.auth.permission.format != 'cap')))):
            continue
        elif ((f in ('wkt', 'the_geom')) and tablename.startswith('gis_layer_shapefile_')):
            continue
        if (fields or skip):
            if (f in meta_fields):
                append(f)
                continue
            if (self.parent and (not self.link) and (f == self.fkey)):
                append(f)
                continue
            ktablename = s3_get_foreign_key(table[f], m2m=False)[0]
            if ktablename:
                ktable = s3db.table(ktablename)
                if (ktable and hasattr(ktable, 'instance_type')):
                    append(f)
                    continue
        if (f in skip):
            continue
        if ((not fields) or (f in fields)):
            qfields.append(f)
    fields = list(set(filter((lambda f: hasattr(table, f)), qfields)))
    if (self._rows is not None):
        self.clear()
    pagination = ((limit is not None) or start)
    rfilter = self.rfilter
    multiple = (rfilter.multiple if (rfilter is not None) else True)
    if ((not multiple) and self.parent and (self.parent.count() == 1)):
        start = 0
        limit = 1
    rows = self.select(fields, start=start, limit=limit, orderby=orderby, virtual=virtual, as_rows=True)
    ids = self._ids = []
    new_id = ids.append
    self._uids = []
    self._rows = []
    if rows:
        new_uid = self._uids.append
        new_row = self._rows.append
        pkey = table._id.name
        for row in rows:
            if hasattr(row, tablename):
                _row = ogetattr(row, tablename)
                if (type(_row) is Row):
                    row = _row
            record_id = ogetattr(row, pkey)
            if (record_id not in ids):
                new_id(record_id)
                new_row(row)
                if load_uids:
                    new_uid(ogetattr(row, UID))
    length = len(self._rows)
    if ((not pagination) or ((not start) and (not length))):
        self._length = length
    return self._rows
