我有一个Notification
模型,其中belongsToMany
用户来自users-permissions
插件。
我有另一个模型称为Profile
哪个belongsToOne
用户。
现在,我想populate
通知相关user
人员及其profile
...
我努力了:
await strapi.query("user", "users-permissions").find({_id: `model id`}).populate('profile')
向我投掷Impossible to find the plugin where strapi.query has been called.
。
也试过:
notification.user.populate('profile')
也没有运气
我也试过strapi.plugins["users-permissions"].models.user
得到未定义!