I implemented the
- (void) dealloc {
NSLog(@"Dealloc of MSSession object");
}
It is not called either.
The query is fetched using a class method, like this one below:
+ (CBLQuery*) queryProfilesInDatabase: (CBLDatabase*)db {
CBLView* view = [db viewNamed: @"profiles"];
if (!view.mapBlock) {
// Register the map function, the first time we access the view:
[view setMapBlock: MAPBLOCK({
if ([doc[@"type"] isEqualToString:kType])
emit(doc[@"_id"], doc[@"queue"]);
}) reduceBlock: nil version: @"1"]; // bump version any time you
change the MAPBLOCK body!
}
return [view createQuery];
}
Actually no instance of the CBLModel is created.
Since I'm using emit(doc[@"_id"], doc[@"queue"]); Is it possible that index
is not refreshed when I modify ony the doc[@"queue"]?
-Sean
On Thursday, February 26, 2015 at 12:50:10 AM UTC+8, Jens Alfke wrote:
>
>
> On Feb 25, 2015, at 8:38 AM, SeanDev <[email protected] <javascript:>>
> wrote:
>
>
> 1. I get the query from CBLModel subclass.
>
> A CBLModel may have a very short lifetime, because the reference from the
> document to the model is weak. So it’s entirely possible your model goes
> away before the live query every updates, if there’s no other strong
> reference to that model object anywhere. You could check this by putting a
> breakpoint in your -dealloc method.
>
> —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/9bc1d90d-8b8f-4da4-ad78-f8b25ff1cff0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.