public function getDirtyAttributes()
    {
        $values = array();
        foreach (array_keys(get_object_vars($this)) as $key) {
            if (in_array($key, $this->_dirtyAttr)) {
                $values[$key] = $this->$key;
            } elseif ($this->$key instanceof ArrayObject) {
                foreach ($this->$key as $sub) {
                    if (($sub instanceof DirtyAware) && $sub->isDirty()) {
                        if (!array_key_exists($key, $values)) {
                            $values[$key] = new $this->$key;
                        }
                        $values[$key]->append($sub);
                    }
                }
            }
        }
        return $values;
    }