''

def trigger(self, attr, old, new, hint=None, setter=None):

    if (not hint):
        dirty = {'count': 0}
        def mark_dirty(obj):
            dirty['count'] += 1
        if (self._document is not None):
            _visit_value_and_its_immediate_references(new, mark_dirty)
            _visit_value_and_its_immediate_references(old, mark_dirty)
            if (dirty['count'] > 0):
                self._document._invalidate_all_models()
    super(Model, self).trigger(attr, old, new, hint, setter)
