             if not before.equals(record)
                 # there was an actual change, so update; doesn't change anything involving indexes.
                 changes = changes.add(@_primary_key_cols(record))
-                return new DBDoc(@_primary_keys, @_string_cols, @_records.set(n, record), @_everything, @_indexes, changes)
+                return new DBDoc(@_primary_keys, @_string_cols, @_records.set(n, record), @_everything, @_indexes, {changes:changes, from_db:@_changes.from_db})
             else
                 return @
         else

        @_check()
        return @_doc.get_read_only()

    _on_change: () =>
        if not @_doc?
            # This **can** happen because @_on_change is actually throttled, so
            # definitely will sometimes get called one more time,

        {where, set, obj} = @_parse(obj)
        # console.log("set #{misc.to_json(set)}, #{misc.to_json(where)}")
        matches = @_select(where)
        {changes} = @_changes
        n = matches?.first()
        # TODO: very natural optimization would be be to fully support and use obj being immutable
        if n?
