-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
status: duplicateIs a duplicate of another issueIs a duplicate of another issue
Description
Related issue, no answer,
@lauriejim why u did close it?
Model
"attributes": {
"admin": {
"plugin": "users-permissions",
"model": "user",
"via": "restaurant"
},
"users": {
"plugin": "users-permissions",
"collection": "user",
"via": "restaurant"
}
}
Original query
strapi.query('restaurant').findOne({ id: params.id }, populate);
Query 1
populate = [];
Actual result
{
admin: USER.ID,
users: []
}
Query 2
populate = ['users'];
Actual result
{
admin: USER.ID,
users: [USER, USER, USER]
}
Query 3
populate = ['users.id'];
Actual result
error MissingSchemaError: Schema hasn't been registered for model "restaurant".
Expected result
{
admin: USER.ID,
users: [USER.ID, USER.ID, ...], // not user model, only id
}
- Strapi Version: 3.4.0
- Operating System: MacOS
- Database: MongoDB
- Node Version: v14.15.3
Metadata
Metadata
Assignees
Labels
status: duplicateIs a duplicate of another issueIs a duplicate of another issue