Replies: 2 comments 3 replies
-
Hoi hoi! The above is correct. A many-to-many is no different from a one-to-many followed by a many-to-one. You can have any other fields you might need on the junction collection, as it's just another collection. We can't and won't skip that junction collection by default, as that would cause problems for this use cases. We could discuss the possibility of adding an additional flag to "skip" collections somehow; curious to hear your thoughts! Groetjes! 👋🏻 |
Beta Was this translation helpful? Give feedback.
-
Bedankt! Makes sense. I do believe these features are based on informed decisions, it's just hard to make this stuff out from the docs alone. While the app interface is very friendly and 'no code', it becomes very technical, very fast. Which is fine, but not all field types are self explanatory, and they are just not well documented either. I often have no idea where to start or what steps to take to make something work. Eg: oh wow, I can even add a tree view, noice - followed by many failed attempts to add one because I have no idea what the prerequisites are, what the tree view actually does, what the use case is (and if it fits mine), how it will look like in the api, ... and not a single word about it in the docs. This is just one example, but I'm getting off topic. Not bashing, I'm very convinced Directus will be our way forward, but I have coworkers to convince (and they are not the patient type!). |
Beta Was this translation helpful? Give feedback.
-
I am a new Directus user, trying to figure out if it could fit our use case.
I have 2 collections with a many to many relation, personen and tags.
This seems to work well within the app.
But I can't seem to get the same (simple) results from the API (the docs on this part are quite condensed and not that hands-on).
By default it returns the id's from the related collection. If i specifically ask to add everything from tags with the wildcard, I get the fields from the junction table, not from the actual related table.
The only way I found to get the actual fields of the related table is to reference the junction table in the fields param:
But this brings an extra level of nesting (tags_id) which feels a bit ... weird.
Is there any other way to do this more easily? Or is there a better way to show a list of people and their related tags?
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions