Replies: 4 comments 5 replies
-
Check out the Example: Retrieve all fields from certain levels deep In SDK: |
Beta Was this translation helpful? Give feedback.
-
I'm curious! What keywords did you search for? We get this question a lot, so seemingly people aren't finding their way to https://docs.directus.io/reference/introduction.html#relational-data organically 🤔 |
Beta Was this translation helpful? Give feedback.
-
{
"type": "uuid",
"meta": {
"interface": "file-image",
"special": [
"file"
]
},
"field": "Image_preview"
},
{
"collection": "Image_themes",
"field": "Image_preview",
"related_collection": "directus_files",
"meta": {
"sort_field": null
},
"relationship": {
"type": "many-to-one",
"on_delete": "SET NULL"
}
} i am writing sdk import script but relationship properly not work please any help me |
Beta Was this translation helpful? Give feedback.
-
Hi,
Trying to learn Directus and really digging it so far!
This might be a silly question but tried to search for an answer and couldn't find one.
I'm using SDK to get items. I have created Many to One field for directus_users. It's related to "company" collection that has UUID.
Can I determine what field Directus returns? Now when reading directus_users, it gives the companys UUID, I'd like it to return the companys name. I only need the one field from the company collection, so a new query just for the name is kinda of an overkill. I thought that I could use the display template for that, but apparently it doesn't work that way.
Thanks guys!
Beta Was this translation helpful? Give feedback.
All reactions