ChangeSet class
A snapshot of all changes about to be saved
(or just saved) by a single saveChanges()
call. Interceptors receive this in
onSaveChangesStart and onSaveChangesEnd.
This is the entity-level view (vs the
command-level view of QueryCommand /
MutationCommand). One ChangeSet can
contain N entries (one per Added / Modified /
Deleted entity).
Constructors
-
ChangeSet({required List<
ChangeEntry> entries, required DbContext context, required int batchId}) -
const
Properties
- batchId → int
-
Monotonic counter — increments per
saveChanges()call. Useful for correlating logs.final - context → DbContext
-
The DbContext that produced this change set.
Interceptors can use this to access the
tracker or other context state.
final
-
entries
→ List<
ChangeEntry> -
The per-entity changes, in save order.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
no setter
- isNotEmpty → bool
-
no setter
- length → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited