protected static function cacheAttrsMap()
    {
        $class = get_called_class();
        $attrs = $class::getAttrs();
        $private = & $class::getPrivateData();

        if (!isset($private['attrsMapCache'])) {
            $private['attrsMapCache'] = array();
        }

        $cache = & $private['attrsMapCache'];

        if (empty($cache)) {
            $cache = array(
                'db' => array(),
                'model' => array()
            );

            foreach ($attrs as $key => $value) {
                if (isset($value['field'])) {
                    $cache['db'][$key] = $value['field'];
                    $cache['model'][$value['field']] = $key;
                }
            }
        }
    }