5
1:1 Relations Alternative: Limiting records in a 1:M , M:1, or M:N relationship.
Source: directus/directus#23719 · opened by @FreeSynergy
Summary Here’s the translation: Instead of creating a 1:M, M:1, or M:N relationship, you could add a field that limits the number of records, or input two fields that allow a range of records. This way, when creating a record, you could specify that exactly 2 records MUST be entered by requiring a minimum of 2 and a maximum of 2. A record would then have to be linked to 2 other records. Or, you might want to create a 1:1 relationship, with at least 1 and at most 1 record—this is a very clean and flexible alternative. It is also possible to create a relationship where 0 to a maximum of 4 records are connected to 3 to 5 other records. In plain terms: If there is no first record, then there are no connections. But if there is a record, it must have at least 3 and at most 5 records linked to it. If no value is entered, it is considered infinite—so two empty fields would then mean something similar to "0 to infinity". Basic Example This Table: Min: - Max: - Re…
No pledges yet. Be the first to back this.
Comments
Similar requests
Allow validation on nested relational values through parent validation settings
1 vote · 0 comments
[Documentation Improvement] Collection API: Need Examples for Creating Relations (1:n, m:1, n:m) Programmatically
6 votes · 0 comments
Inefficient revision tracking of items with 100+ related ited
1 vote · 0 comments
M2M relationship in both objects
2 votes · 0 comments
[Feature] - File Garbage Collector - Unreferenced Files
3 votes · 0 comments
No comments yet.