The problem with reactions is that we have not one of them, we have x of them.
So i can select all reactions, then select all reacted ones from me or for me for one reaction.
This means that i have cnt_reactions queries to show them.
Is there a better way?
Count them in a batch and plus or minus reactions to an array_field for every user?
Or a better selection in realtime than
foreach reactions
- select reactions for my content
=> view it
and
foreach reactions
- select reactions from me for other content
=> view it
So i can select all reactions, then select all reacted ones from me or for me for one reaction.
This means that i have cnt_reactions queries to show them.
Is there a better way?
Count them in a batch and plus or minus reactions to an array_field for every user?
Or a better selection in realtime than
foreach reactions
- select reactions for my content
=> view it
and
foreach reactions
- select reactions from me for other content
=> view it