Background
BaseEntity.handleUpdate, __internalGet, getUpdatedProperties, and dirtyFields now interact with EntityRoot. This path has no direct unit tests.
Scope
Create a minimal test entity with one typed property and test only root-backed property tracking.
Test cases
- Updating a persisted entity records the new value under its
EntityKey.
- Generic reads see the latest value recorded in the root.
getUpdatedProperties() and dirtyFields() report the changed field.
- Repeating an update with the same value does not add a new dirty field.
- Returning a property to its original value removes it from the entity-local change view.
- A trace chain present during update is copied to the root.
- An entity without an ID falls back to its local change-tracking behavior.
Acceptance criteria
- The test fixture overrides only the supported framework-internal accessors.
- Tests remain inside
teaql-core and require no database.
- Any discrepancy between local and root-backed dirty state is documented by a failing test before production code is changed.
Background
BaseEntity.handleUpdate,__internalGet,getUpdatedProperties, anddirtyFieldsnow interact withEntityRoot. This path has no direct unit tests.Scope
Create a minimal test entity with one typed property and test only root-backed property tracking.
Test cases
EntityKey.getUpdatedProperties()anddirtyFields()report the changed field.Acceptance criteria
teaql-coreand require no database.