Skip to content

Touch only configured timestamp fields - #341

Open
elpete wants to merge 3 commits into
nextfrom
feat/53-touch-timestamps
Open

Touch only configured timestamp fields#341
elpete wants to merge 3 commits into
nextfrom
feat/53-touch-timestamps

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #53

Issue review

Recommendation: 8/10 — touch is a useful entity-level operation, but it must not accidentally persist unrelated dirty state.

Implementation

  • adds timestampFields(), defaulting to [ "modifiedDate" ], so entities can override the timestamp attributes they use
  • makes touch() restore the entity to its last clean state before assigning timestamps
  • uses one timestamp value for every configured field and then saves normally, preserving Quick lifecycle behavior
  • keeps query execution options available through touch( options = {} )

Regression coverage

  • proves a dirty non-timestamp attribute is restored in memory and is not persisted
  • proves the default modified timestamp is updated and the entity is clean afterward
  • proves an entity override of timestampFields() controls which timestamp is touched

Validation

  • focused Lucee 6 SaveSpec: 20 passed, 0 failed, 0 errors
  • formatting check passed
  • git diff --check passed

Uses qb@14.0.0-beta.3 and targets next.

@elpete
elpete force-pushed the feat/53-touch-timestamps branch from 655c0bf to 822a110 Compare August 24, 2026 21:19
@elpete elpete changed the title Add touch for entity timestamps Touch only configured timestamp fields Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant