'Lookup all rows referenced by values.
(in foreign key representations)
@param key: the key Field
@param values: the values
@param fields: the fields to retrieve'

def _lookup_rows(self, key, values, fields=[]):

    fields.append(key)
    if (len(values) == 1):
        query = (key == values[0])
    else:
        query = key.belongs(values)
    rows = current.db(query).select(*fields)
    self.queries += 1
    return rows
