2
M2M relationship in both objects
Source: directus/directus#22974 · opened by @rijkvanzanten
M2M fields currently only filter to the current junction field (by design). When the M2M field is recursive, it should use both the "current" junction and the "foreign" junction field
---
Discussed in
<div type='discussions-op-text'>
<sup>Originally posted by keesvanbemmel June 23, 2022</sup>
Hi!
Not sure if this is even possible, or if I'll go into endless loops or anything. But I have a self referencing M2M relationship. The articles collection had an M2M field called "related_articles" referencing the articles collection itself.
Now, when I add a related article to an article, I would also like to automatically set the relation the other way around. Is that a feature at the moment? Or should I go with a hook on the junction table?
Cheers!
Kees.</div>
---
Discussed in
<div type='discussions-op-text'>
<sup>Originally posted by keesvanbemmel June 23, 2022</sup>
Hi!
Not sure if this is even possible, or if I'll go into endless loops or anything. But I have a self referencing M2M relationship. The articles collection had an M2M field called "related_articles" referencing the articles collection itself.
Now, when I add a related article to an article, I would also like to automatically set the relation the other way around. Is that a feature at the moment? Or should I go with a hook on the junction table?
Cheers!
Kees.</div>
No pledges yet. Be the first to back this.
Comments
Similar requests
Allow disabling editing of a M2M linked item
5 votes · 0 comments
`sort` field is visible after creating a M2M field
1 vote · 0 comments
A module for filtering a collection against its related data values
1 vote · 0 comments
Manual sorting in M2M interface table layout is not obvious
2 votes · 0 comments
m2m: option to hide relational item in drawer
12 votes · 0 comments
No comments yet.