Skip to content

feat(core): Extend custom relational field config#4448

Open
LucidityDesign wants to merge 2 commits intovendurehq:masterfrom
LucidityDesign:feat/custom-field-relations
Open

feat(core): Extend custom relational field config#4448
LucidityDesign wants to merge 2 commits intovendurehq:masterfrom
LucidityDesign:feat/custom-field-relations

Conversation

@LucidityDesign
Copy link

@LucidityDesign LucidityDesign commented Feb 28, 2026

Description

Adds properties like cascade, onDelete and onUpdate to custom fields of type relation

Breaking changes

Does this PR include any breaking changes we should be aware of?

Screenshots

You can add screenshots here if applicable.

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Adds properties like cascade, onDelete and onUpdate
@vercel
Copy link

vercel bot commented Feb 28, 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 28, 2026 9:10pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3921bf4 and d0e1244.

📒 Files selected for processing (1)
  • docs/docs/guides/developer-guide/custom-fields/index.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/docs/guides/developer-guide/custom-fields/index.mdx

📝 Walkthrough

Walkthrough

The relation custom field type was changed to reuse TypeORM's RelationOptions: RelationCustomFieldConfig now includes cascade, onDelete, onUpdate, and eager from RelationOptions instead of declaring eager locally. The custom-entity field registration logic now destructures cascade, onDelete, onUpdate, and eager from relation fields and forwards nullable, cascade, onDelete, onUpdate, and eager to ManyToMany and ManyToOne decorators. Documentation was updated to document cascade, onDelete, and onUpdate properties.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: extending custom relational field configuration with new properties.
Description check ✅ Passed The description addresses the main change and includes most required checklist items, though test coverage status is unchecked and not addressed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

1 participant