mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Fix a bug that was not automatically adding the join column to the select list when populated
This commit is contained in:
parent
65feb971b8
commit
b4f4b499b9
@ -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