Skip to content

fix(core): Persist scalar custom fields in updateGlobalSettings with relations#4368

Draft
biggamesmallworld wants to merge 1 commit intomasterfrom
fix/global-settings-custom-field-relations
Draft

fix(core): Persist scalar custom fields in updateGlobalSettings with relations#4368
biggamesmallworld wants to merge 1 commit intomasterfrom
fix/global-settings-custom-field-relations

Conversation

@biggamesmallworld
Copy link
Collaborator

Summary

  • Fixes updateGlobalSettings mutation not persisting scalar custom field values when a relational custom field is also defined on GlobalSettings
  • Saves the entity to DB before calling updateRelations(), matching the pattern used by other services (e.g. CollectionService, FacetService)
  • Adds e2e test verifying scalar + relational custom fields persist together

Fixes #4342

Test plan

  • Existing custom-field-relations e2e tests pass (59/59)
  • Existing global-settings e2e tests pass (7/7)
  • New test verifies scalar values persist when updated alongside relations
  • New test re-queries after mutation to confirm DB persistence

🤖 Generated with Claude Code

…relations

Save the entity to DB before calling updateRelations so that when
updateRelations re-fetches the entity, it picks up the already-persisted
scalar custom field values instead of stale DB values.

Fixes #4342

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vendure-storybook Ready Ready Preview, Comment Feb 17, 2026 1:10pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/global-settings-custom-field-relations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

updateGlobalSettings does not persist scalar custom fields when a relational custom field exists

1 participant