It seems I have things backward. Here is an example of how I am creating
the CBLModels:
+ (Claim *) save:(NSMutableDictionary *)dictionary {
NSLog(@"%@", dictionary);
BOOL encrypted = [dictionary objectForKey:@"data"] != nil;
CBLDocument *doc = [self saveCBLDocument:dictionary encrypted:encrypted];
return [Claim modelForDocument:doc];
}
It looks like I will have to create the CBLModel before I create the
CBLDocument so that it will pick up the overridden version of
idForNewDocumentInDatabase:. Yes?
On Monday, February 10, 2014 1:40:58 PM UTC-8, Alan McKean wrote:
>
> Oops. That's creating the CBLDocument, not the CBLModel.
>
>
> On Monday, February 10, 2014 1:37:43 PM UTC-8, Alan McKean wrote:
>>
>> app.database createDocument. I'll change it.
>>
>> On Monday, February 10, 2014 1:34:32 PM UTC-8, Jens Alfke wrote:
>>>
>>>
>>> On Feb 10, 2014, at 12:48 PM, Alan McKean <[email protected]> wrote:
>>>
>>> Doesn't idForNewDocumentInDatabase: get called by CBL? I overrode it in
>>> my CBLModel subclass but it never gets called.
>>>
>>>
>>> It gets called by -setDatabase:, which is called by
>>> -initWithNewDocumentInDatabase:.
>>>
>>> How are you creating your model objects?
>>>
>>> —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/f82dac83-0a6f-4b4a-bc75-07476eca86e6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.