I create a live query from a view and assign it to a CBLTableSource that drives my view. In this view I enter some data and then press a button that adds a document with this data to my database.
I have enable logging for Sync and Query on CBLManager. When the save method is called on my new document, I can see the SYNC progress logging replicating my document with my server, and I see a different live query of which one of the objects I access during the creation of my new document logging Rows changed!, but the live query that the document is added to does not update (or at least show this in the logs).
I know it is adding it to the correct view/query because upon called liveQuery.stop(); liveQuery.start() the document shows up and then logging shows that it notices rows have changed. Without calling these, the document doesn’t show up until I reload the view controller, at which point the query logs the change.
Any help would be appreciated, thank you for your time.
I am using an iPhone 5s running iOS 8.3 and the latest version of the Sync Gateway, CB Server, and CouchbaseLite framework
Sounds like you’ve got Query logging enabled already since you see the Rows changed! message from the other query. In that case, do you see the problematic query logging something like CBLLiveQuery[...]: Async query dbname/viewname...? That message gets logged when the LiveQuery detects a database change and re-runs the underlying query.
If you’re getting that message, but not the Rows changed! logged by the same query, it indicates the query results didn’t change. Maybe due to a bug the map function doesn’t emit anything for your new document.
If you’re not even getting the Async query... message, something weirder is wrong…
Unfortunately, I am not seeing any message concerning the query in question until stop and start is called again. My logs are here (postByDate is the troublesome query):