Use UPDATE DQL to write the calculated result to the database on flush.  Currently ignores observers and just calculates everything on every flush.
Passing tests!