Issue getting related data while limiting retrieved fields


#1

Good morning.
I don’t understand why when I try to limit the number of fields I retrieve from 2 tables then it goes wrong…
I am connected to a mysql database.
The following Query works fine and I get all fields for country table and currency table:
_table/country?related=currency_by_currencyid&limit=1

It provides:
{
“resource”: [
{
“CountryId”: 1,
“Code”: “BE”,
“Name”: “Belgium”,
“RegionId”: 1,
“languageid”: 1,
“currencyid”: 44,
“isnonpem”: false,
“isTestCountry”: false,
“isPartnerCountry”: false,

“ownershipId”: 1,
“modifiedBy”: null,
“modifiedDate”: null,
“currency_by_currencyid”: {
“currencyid”: 44,
“currency_code”: “EUR”,
“name”: “Euro”
}
}
]
}

But the following is not working :
_table/country?fields=name%2Ccode&related=currency_by_currencyid&currency_by_currencyid.fields=code%2Cname&limit=1
As it provides:
{
“resource”: [
{
“Name”: “Belgium”,
“Code”: “BE”,
“CountryId”: “1”,
“RegionId”: “1”,
“countryServiceDataId”: “771”,
“countryTechnolgyDataId”: “771”,
“ownershipId”: “1”,
“languageid”: “1”,
“currencyid”: “44”,
“currency_by_currencyid”: null
}
]
}