Interface for entities that are managed by the Datapod ORM.
Managed entities carry additional state information used for persistence
orchestration, such as dirty tracking and persistence status. This allows
Datapod to efficiently decide between INSERT and UPDATE operations
when save is called on a repository.
Datapod automatically generates ManagedEntity implementations for your entity classes during the build process. You typically do not need to implement this interface manually.
Properties
- $database ↔ DatapodDatabase?
-
The database instance that manages this entity.
getter/setter pair
- $id → dynamic
-
The value of the primary key field for this entity.
no setter
- $relationshipContext ↔ RelationshipContext?
-
The relationship context used for orchestrating associations.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDirty → bool
-
Whether the entity has unsaved changes.
no setter
- isManaged → bool
-
Whether the entity is currently managed by the ORM.
no setter
- isPersistent → bool
-
Whether the entity represents a persistent record in the database.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearDirty(
) → void - Resets the dirty state of the entity.
-
markDirty(
) → void - Marks the entity as having unsaved changes.
-
markPersistent(
) → void - Marks the entity as managed and persistent (e.g., after a successful insert).
-
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