Possible to Make a Query from DB only once and then use that data on other models without requerying
HI, Wondering if this is possible.
We are use a DSO with PostgreSQL and when inspecting page load, it seems every model is pulling from DB.
Here's my scenario and question
I have a table of transactions with a field named Category:
For each category I need an AGG model, and Regular model
So if i have 5 categories, i will have 10 models, and it seems each is querying from the DB
Here's my idea/question, any help would be appreciated.
Can i query this table fully once (model named: all_transactions) and then all 10 models mentioned above would basically would 'Grab' the data from that model only without ever needing to query from the DB?
I tried with condition that all the 10 models' ID is in the set of values from any row from all_transaction table, but it seems to me it still pulling from DB.
Hope it's clear.