System Information
- Strapi Version: 3.6.5
- Operating System: linux
- Database:
- Node Version: v14.16.0
- NPM Version: 6.14.5
- Yarn Version:
I am using strapi-plugin-i18n.
I have locales 'en', 'fr', 'de'
.
I have records in the database:
{
_id: someId1,
name: 'name 1',
locale: 'en',
localizations: [...]
}
{
_id: someId2,
name: 'name 2',
locale: 'fr,
localizations: [...]
}
Service
const res = await strapi
.query ('somemodel')
.model.find ({locale}, [
'_id',
'name'
])
.lean ();
If I make a request when locale = en
, I get an entry with that locale.
But when I make a query with locale = de
, I won’t find any entry.
How can I do that, when a locale for which there is no entry, the entry is returned as for the default locale 'en'
?