mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Merge pull request #8866 from strapi/rf/fix-mongo-many-many-preview
Fix many-many preview with mongo
This commit is contained in:
commit
e8a016be55
@ -293,8 +293,9 @@ module.exports = {
|
||||
assoc.targetUid
|
||||
);
|
||||
} else {
|
||||
const assocModel = strapi.db.getModelByAssoc(assoc);
|
||||
relationList = await entityManager.findPage(
|
||||
{ page, pageSize, [assoc.via]: entity.id },
|
||||
{ page, pageSize, [`${assoc.via}.${assocModel.primaryKey}`]: entity.id },
|
||||
assoc.targetUid
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user