'Initialize base model attributes.'

@classmethod
def _build_model_attributes(cls, pool):

    cls._description = cls._name
    cls._table = cls._name.replace('.', '_')
    cls._sequence = None
    cls._log_access = cls._auto
    cls._inherits = {}
    cls._depends = {}
    cls._constraints = {}
    cls._sql_constraints = []
    for base in reversed(cls.__bases__):
        if (not getattr(base, 'pool', None)):
            cls._description = (base._description or cls._description)
            cls._table = (base._table or cls._table)
            cls._sequence = (base._sequence or cls._sequence)
            cls._log_access = getattr(base, '_log_access', cls._log_access)
        cls._inherits.update(base._inherits)
        for (mname, fnames) in base._depends.iteritems():
            cls._depends[mname] = (cls._depends.get(mname, []) + fnames)
        for cons in base._constraints:
            cls._constraints[getattr(cons[0], '__name__', id(cons[0]))] = cons
        cls._sql_constraints += base._sql_constraints
    cls._sequence = (cls._sequence or (cls._table + '_id_seq'))
    cls._constraints = cls._constraints.values()
    for parent_name in cls._inherits:
        pool[parent_name]._inherits_children.add(cls._name)
    for child_name in cls._inherit_children:
        child_class = pool[child_name]
        child_class._build_model_attributes(pool)
