Open sanfilippopablo opened 5 years ago
@sanfilippopablo Did you ever find a better / more elegant (/ faster?) way of doing this? Just noticed your (this) issue, similar to the one I just created.
@sanfilippopablo actually just answered my own question / issue :-D
I tried to search for a similar issue but found nothing. Sorry if it's a duplicate.
I want to query actions by a target object property. Let's say I have:
and that models is the target of many actions. Now I want to get a feed of all the actions for this target in which the color is
"blue"
. My first idea was to do:but turns out you can't do that with GFKs.
My next idea was to do this:
That yielded the expected result. It's also efficient, given that it will make everything in just one DB query. But is there a better (or official) way of doing this?