Replies: 2 comments 6 replies
-
You need to create a method "if it doesnt already exist" that will retrieve the data from this UserByRoleNameIndex and that will cache it on server side. Then you call a second method |
Beta Was this translation helpful? Give feedback.
-
I dont want to cache something on the server . I want to store in the document the aggregation results per role . |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently in orchard there is a UserByRoleNameIndex that stores the number of users per role.
I would like to show in the roles list in the admin a badge with the number of users per role.
But I have to change the entire query from using the document to using the reduce index query.
Is there some way or hook or event to store the aggregation result inside the role document so i can just grab it from the document and show it in the UI. Since it inherits from an IEntity which is a JObject I can just add anything I want in there.
But it needs to be updated anytime the reduce index is changed.
Is there any way to acheive this ?
Originally post on the yesSQL repo but asking here since I wish to use it within orchardcore
sebastienros/yessql#446
Beta Was this translation helpful? Give feedback.
All reactions