So, I have a Projects collection with a UUID for a PK and a second field called “monday_id” which is BIGINT, unique and indexed… I want to create a relationship to Projects from “Project Subitems” using the “monday_id”, NOT the Projects PK. Is this possible?
This is not possible today (v11.8.0). Directus relies on the table’s primary key to setup the relationships.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Migrating int id primary key to uuid in Postgres | 2 | 41 | March 16, 2026 | |
| O2M with a non-primary key? | 1 | 35 | December 16, 2025 | |
| 02M relationship errors | 0 | 15 | February 10, 2026 | |
| Working with exited DB with many tables have composite PK | 0 | 34 | August 14, 2025 | |
| How to use an external system’s ID (e.g. Lightspeed) as the primary key in Directus collection? | 2 | 112 | June 13, 2025 |