I have an Article in two Locales.
The type has a field called ‘slug’ which is a UID so now my GET requests will use this UID to find a single Article
curl http://localhost/articles/123-en-test
200: All good
curl http://localhost/articles/123-fr-test
404: Not found
If I look at the database logs I see the problem
{
method: 'select',
options: {},
timeout: false,
cancelOnTimeout: false,
bindings: [ '123-fr-test', 'en', 1 ],
__knexQueryUid: 'sr99CkLDK_NZrcAhzWB_Y',
sql: 'select `articles`.* from `articles` where `articles`.`slug` = ? and `articles`.`locale` = ? and (`articles`.`published_at` is not null) limit ?'
}
[2021-11-13T17:10:46.858Z] debug GET /articles/123-fr-test (39 ms) 404
Surely, we shouldn’t need the locale in the query when this a get by UID
Is this a bug?
Version 3.6.8
Best,
Jon