I'd like to do the same thing ... have support for child models that don't need to be separate docs. Currently, we have a base class which takes a NSDictionary to set up the properties ... it's used for model properties that don't have separate doc ... but the CBLJSONEncoding looks like a better approach.
Jens - Is this a good example to follow for your suggestion? https://github.com/couchbase/couchbase-lite-ios/blob/stable/Source/API/ModelTests.m#L55 On Thursday, January 16, 2014 3:53:26 PM UTC-6, Jens Alfke wrote: > > > On Jan 16, 2014, at 12:10 PM, Alexander Selling > <[email protected]<javascript:>> > wrote: > > I'm trying to find a way to opt out on this since my server side project > uses inlined dictionaries/documents inside other documents. > > > Then those shouldn't be separate documents in your database. You can > implement the CBLJSONEncoding protocol (see CBLJSON.h) in a custom object > class, and if you make a model property of that type the data will be > stored in the model as inlined JSON. > > —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/ff8e0970-b801-48ea-86f1-bdf4e16e99f3%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
