notifyOrDefer
Inside a transaction, records tableName as dirty so its notification is sent once, after the outermost commit — or not at all if the transaction rolls back. Outside a transaction, calls KilnDriver.notifyListeners immediately (preserving the existing per-operation behaviour).
Called by generated repository code — not intended for direct use.