mirror of
https://github.com/strapi/strapi.git
synced 2025-12-11 15:04:33 +00:00
Merge pull request #14695 from strapi/fix/process-populate-join-column-missing-select
Fix inline relations not being selected automatically when populated
This commit is contained in:
commit
2a4d0ca6a8
@ -83,7 +83,13 @@ const processPopulate = (populate, ctx) => {
|
||||
continue;
|
||||
}
|
||||
|
||||
// make sure id is present for future populate queries
|
||||
// Make sure to query the join column value if needed,
|
||||
// so that we can apply the populate later on
|
||||
if (attribute.joinColumn) {
|
||||
qb.addSelect(attribute.joinColumn.name);
|
||||
}
|
||||
|
||||
// Make sure id is present for future populate queries
|
||||
if (_.has('id', meta.attributes)) {
|
||||
qb.addSelect('id');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user