## Summary - Fixes "Target field metadata full object not found" error thrown during optimistic effects (e.g., bulk delete) on workspaces with custom objects - The relation loader was using a simple sort-by-ID to pick the representative morph field, while `filterMorphRelationDuplicateFields` uses `pickMorphGroupSurvivor` which prefers active non-system fields. When a custom object's auto-created morph field (`isSystem: true`) happened to have the smallest UUID, the two loaders would disagree — the relation DTO pointed to that system field's ID, but the field metadata loader filtered it out in favor of a standard field, causing the frontend lookup to fail. - Now both code paths use `pickMorphGroupSurvivor` so they always agree on which morph field represents the group. ## Test plan - [ ] Create a custom object on a workspace that already has standard objects with morph relations (e.g., noteTarget, taskTarget) - [ ] Bulk-select and delete records (e.g., People) — should no longer throw "Target field metadata full object not found" Made with [Cursor](https://cursor.com) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Small, localized change to morph-relation selection logic in a dataloader; main risk is altered field choice for edge-case morph groups, but behavior now matches existing deduplication. > > **Overview** > Ensures the relation dataloader picks the representative morph-relation target field using `pickMorphGroupSurvivor` (preferring active non-system fields) instead of the previous sort-by-id approach. > > This aligns `createRelationLoader` with `filterMorphRelationDuplicateFields`, preventing mismatches where relation DTOs could reference a morph field that gets filtered out elsewhere (e.g., triggering “Target field metadata full object not found”). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c3a6d861262cd21c49cb7582767d419e8048980d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Cursor <cursoragent@cursor.com>
The #1 Open-Source CRM
🌐 Website · 📚 Documentation · Roadmap ·
Discord ·
Figma
Installation
See: 🚀 Self-hosting 🖥️ Local Setup
Does the world need another CRM?
We built Twenty for three reasons:
CRMs are too expensive, and users are trapped. Companies use locked-in customer data to hike prices. It shouldn't be that way.
A fresh start is required to build a better experience. We can learn from past mistakes and craft a cohesive experience inspired by new UX patterns from tools like Notion, Airtable or Linear.
We believe in Open-source and community. Hundreds of developers are already building Twenty together. Once we have plugin capabilities, a whole ecosystem will grow around it.
What You Can Do With Twenty
Please feel free to flag any specific needs you have by creating an issue.
Below are a few features we have implemented to date:
- Personalize layouts with filters, sort, group by, kanban and table views
- Customize your objects and fields
- Create and manage permissions with custom roles
- Automate workflow with triggers and actions
- Emails, calendar events, files, and more
Personalize layouts with filters, sort, group by, kanban and table views
Customize your objects and fields
Create and manage permissions with custom roles
Automate workflow with triggers and actions
Emails, calendar events, files, and more
Stack
- TypeScript
- Nx
- NestJS, with BullMQ, PostgreSQL, Redis
- React, with Recoil, Emotion and Lingui
Thanks
Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).
Join the Community
- Star the repo
- Subscribe to releases (watch -> custom -> releases)
- Follow us on Twitter or LinkedIn
- Join our Discord
- Improve translations on Crowdin
- Contributions are, of course, most welcome!




