directus / v8-archive

Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API
https://docs.directus.io/api/reference.html
505 stars 204 forks source link

Can't get translated values in many-to-one relation field #2141

Open fnicastri opened 4 years ago

fnicastri commented 4 years ago

When setup a collection with a translation and try to use it as a many-to-one relation from another table can't get the translated fields from the translation table.

my schema:

articles

field interface note
id Primary Key
translations Translation "Language Field" -> language; "Display Template" -> {{title}}

articles_translations

field interface relation
id Primary Key
article Numeric ->articles.id
language Text Input
title Text Input
body Text-Area

pictures

field interface relation note
id Primary Key
article Many to One ->articles.id "Dropdown Template" -> {{translations.title}}

I've tried many other combinations, nothing changes.

result:

image

Expected:

a list of translated article titles

Directus version

Docker v8-apache latest (8.8.1)

fnicastri commented 4 years ago

@benhaynes @rijkvanzanten Nothing?

rijkvanzanten commented 4 years ago

I was literally on vacation for the past 10 days lol, gimme a break 😂

fnicastri commented 4 years ago

@rijkvanzanten Sorry Rijk! 😅