Skip to content

Add selective and explicit eager-load clearing - #345

Merged
elpete merged 3 commits into
nextfrom
feat/48-without-eager-loads
Aug 25, 2026
Merged

Add selective and explicit eager-load clearing#345
elpete merged 3 commits into
nextfrom
feat/48-without-eager-loads

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #48

Issue review

Recommendation: 9/10 — selectively removing default eager loads is a useful query-level control, provided the API distinguishes omission from an explicit request to clear everything.

Implementation

  • without( relationshipName ) removes the named eager load and its nested paths
  • without() with no arguments is a no-op and clears nothing
  • clearEagerLoads() explicitly removes every configured eager load
  • both methods remain chainable on the public Quick builder

Regression coverage

  • proves a named automatic eager load can be removed
  • proves without() preserves automatic eager loads
  • proves clearEagerLoads() removes all eager loads and lazy-loading protection still catches access
  • verifies query counts for each behavior

Validation

  • focused Lucee 6 EagerLoadingSpec: 36 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/48-without-eager-loads branch from df91b87 to 0156962 Compare August 24, 2026 21:19
@elpete elpete changed the title Add without for configured eager loads Add selective and explicit eager-load clearing Aug 24, 2026
@elpete
elpete merged commit 5bc7d7c into next Aug 25, 2026
27 checks passed
@elpete
elpete deleted the feat/48-without-eager-loads branch August 25, 2026 17:06
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