'Return a mapping of id numbers to values for the specified field.
The field must be a many-one or many-many field, otherwise a ValueError
is raised.'

@read_api
def get_id_map(self, field):

    try:
        return self.fields[field].table.id_map.copy()
    except AttributeError:
        if (field == u'title'):
            return self.fields[field].table.book_col_map.copy()
        raise ValueError((u'%s    is    not    a    many-one    or    many-many    field' % field))
