> On Dec 10, 2015, at 1:06 PM, Ben Kennedy <[email protected]> wrote:
> 
> In my client code, I want to be able to e.g. fetch vegetables as NSString 
> *vegetables = someModel.edibles.leaves; .

CBLModel only handles top-level document properties. You can use the protocol 
CBLJSONEncoding (declared in CBLJSON.h) to create classes that can be used as 
property types in a CBLModel, whose instances can populate themselves from 
nested properties.

> Next, I have an ancillary question: is it possible, or even valid, to acquire 
> a CBLModel object representing a specific CBLRevision of its CBLDocument?

Unfortunately no. CBLModel always refers to a document’s current revision. What 
you’re asking for is great, but it would require some refactoring of CBLModel 
to accomplish.

After we finish 1.2 we’re going to do some design work on improving the API, 
and beefing up modeling is a key part of that.

—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/8B8A4CCD-9F00-4872-8FC6-08E59657CB3B%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to