Hi Jens, It would be great if I didn't have to store it in the database. But it would make it difficult to sort my records by the ages of a bunch of people in the database if that's what the customer wanted to do.
I think maybe I'll turn off the automatic evaluation of the formula when a record is displayed. I'll make it so the user has to press a button to make that happen. I already have a button that lets customers re-evaluate all the calculations anyway. I think that'll solve the ping-ponging problem at the expense of seeing stale data unless they press that button. Thanks, Brendan On Tuesday, September 29, 2015 at 9:35:09 AM UTC-6, Jens Alfke wrote: > > > On Sep 28, 2015, at 11:54 PM, Brendan Duddridge <[email protected] > <javascript:>> wrote: > > So I have this situation where I have these formulas in my database that > are based on the current date. Whenever a record is viewed, the formula is > evaluated and the value in the database is updated with the result. > > > I wouldn’t store that in the database. At least not in a document that’s > going to be replicated. It’s going to cause a lot of redundant replication > traffic, as you’ve seen, and generate conflicts if there are multiple > clients updating the database. > > —Jens > -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/667e4742-28ad-4199-b9dd-0b46ff46f029%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
