Skip to content

test(core): cover BaseEntity root-backed property change tracking #25

Description

@philipgreat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjavaPull requests that update java code

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions