Skip to content

feat: add individualHooksWithVirtuals flag to filter virtual columns - #3

Merged
diegopedro94 merged 1 commit into
v6.25.2-branchfrom
feat/individual-hooks-filter-virtuals
Nov 14, 2025
Merged

diegopedro94 merged 1 commit into
v6.25.2-branchfrom
feat/individual-hooks-filter-virtuals

Conversation

@diegopedro94

Copy link
Copy Markdown

…from preload queries

  • By default, virtual columns are now excluded from internal findAll queries when individualHooks is enabled (update/destroy/restore)
  • Add individualHooksWithVirtuals flag to opt-in to old behavior
  • Improves performance by avoiding unnecessary virtual column computation
  • Applies to Model.update, Model.destroy, and Model.restore
  • Adds comprehensive test suite for the feature
  • Updates TypeScript definitions and JSDoc documentation
  • Version: 6.25.2-20251113

Performance benefits:

  • Reduces columns selected from database
  • Eliminates unnecessary virtual getter execution
  • Reduces memory usage for instance data
  • Tested across 20+ locations in console-backend using individualHooks

Breaking changes: None (fully backward compatible)

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description Of Change

Todos

…from preload queries

- By default, virtual columns are now excluded from internal findAll
  queries when individualHooks is enabled (update/destroy/restore)
- Add individualHooksWithVirtuals flag to opt-in to old behavior
- Improves performance by avoiding unnecessary virtual column computation
- Applies to Model.update, Model.destroy, and Model.restore
- Adds comprehensive test suite for the feature
- Updates TypeScript definitions and JSDoc documentation
- Version: 6.25.2-20251113

Performance benefits:
- Reduces columns selected from database
- Eliminates unnecessary virtual getter execution
- Reduces memory usage for instance data
- Tested across 20+ locations in console-backend using individualHooks

Breaking changes: None (fully backward compatible)
@diegopedro94
diegopedro94 merged commit 9959a51 into v6.25.2-branch Nov 14, 2025
11 of 49 checks passed
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