I have a property (isFull
) in a model whose value depends on other properties in that same model (counter
).
So far I've been setting the property's value myself whenever any of the properties it depends on change. I wrote a function isFull()
that checks the counter
and returns True
or False
. But I can't use it with a query unless I fetch everything then iterate over the results checking if any of them isFull
, which is BAD I know..
Is there a way to use my function with filter
or gql
? or is there a different way of doing it? I know I can use a filter to check the counter but it goes more complex than that in some cases where I need to check dates, a counter and another flag all at the same time.