> On Aug 5, 2015, at 11:30 AM, Brendan Duddridge <[email protected]> wrote:
> 
> When I try to implement encodeWithCoder and initWithCoder, I am unable to 
> call super and I also get the following error from CBL:

Oh, interesting. Yeah, making models encodable is problematic because they 
should be unique — there should only be one CBLModel instance corresponding to 
a specific document. Whereas if you could encode/decode them, you could easily 
end up with duplicates (encode a model, then decode it — now you have two of 
it.)

I suggest making the token objects just be stubs — for example, use the 
document ID (an NSString) as the token. It’s easy to map between that and the 
model object in either direction.

—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/61BFC95F-D064-4F12-B14F-BA8591EFDB2F%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to