Problem
I'm using Strapi v5 with SQLite database. My Wine content type has many-to-one relations to Category and Region, but these relations are never populated in API responses, regardless of the populate syntax used.
Environment
- Strapi: v5
- Database: SQLite
- Node.js: v22.13.1
Schema Configuration
Wine schema:
{
"category": {
"type": "relation",
"relation": "manyToOne",
"target": "api::category.category",
"inversedBy": "wines"
},
"region": {
"type": "relation",
"relation": "manyToOne",
"target": "api::region.region",
"inversedBy": "wines"
}
}
Category and Region schemas are standard with oneToMany back-references.
What I've Verified
✅ Permissions: All roles have find/findOne enabled for Wine, Category, Region
✅ Database: Relations exist in wines_category_lnk and wines_region_lnk tables
✅ Admin UI: Relations display correctly in Content Manager
✅ Server restarts: Multiple times after schema changes
API Calls Tested
All return wines without relations:
GET /api/wines?populate=\*
GET /api/wines?populate\[category\]=*&populate\[region\]=*
GET /api/wines?populate\[category\]=true&populate\[region\]=true
GET /api/wines?populate\[0\]=category&populate\[1\]=region
GET /api/wines?populate=category,region
Sample response:
{
"data": [
{
"id": 193,
"name": "Château Margaux",
"price": 850,
"createdAt": "2025-09-15T08:06:26.672Z"
// category and region fields completely missing
}
]
}
Database Verification
Relations DO exist in database:
sqlite\> SELECT \* FROM wines_category_lnk WHERE wine_id = 193;
188|193|121|1.0
sqlite\> SELECT \* FROM wines_region_lnk WHERE wine_id = 193;
128|193|111|1.0
Workaround That Works
Using direct database queries in a custom controller:
export default factories.createCoreController('api::wine.wine', ({ strapi }) =\> ({
async find(ctx) {
const results = await strapi.db.query('api::wine.wine').findMany({
populate: {
category: true,
region: true,
},
});
return { data: results, meta: { pagination: {...} } };
},
}));
This returns wines with relations correctly populated.
Question
Why don't standard Strapi v5 API populate queries work, while direct strapi.db.query() calls do? Is this a known bug or am I missing something in the configuration?