Skip to content

perf: optimize virtual fields that reference ID #12159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025
Merged

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Apr 18, 2025

This PR optimizes the new virtual fields with relationships feature #11805 when the path references the ID field, for example:

{
  name: 'postCategoryID',
  type: 'number',
  virtual: 'post.category.id',
},

Previously, we did additional population of category, which is unnecessary as we can always grab the ID from the category value itself. One less querying step.

@r1tsuu r1tsuu merged commit fdff587 into main Apr 18, 2025
81 checks passed
@r1tsuu r1tsuu deleted the perf/virtuals-to-id branch April 18, 2025 18:39
Copy link
Contributor

🚀 This is included in version v3.36.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants