Hi, I’m wondering how other people solve the issue of computed fields.
E.g., I have a collection of customers, on those customers I can add entries. Each entry has a value. I want to show a list of customers that have any entries still not invoiced.
To prevent having to publish all entries every time I want to find() customers with uninvoiced entries, I added a computed field to the customer collection in mongo itself. Keeping it up to date with collection-hooks (whenever something is changed in the entries, I update the computed field on the customer).
This feels very shaky. How do others do this kind of thing? Like summarizing fields without having to publish the entire collection the sum is based on.