On Feb 27, 2014, at 8:34 AM, Todd Freese <[email protected]> wrote:
> However, I noticed in the ToDo example code, that rather than passing a model > object to the detailViewController, it passes the doc id instead and the > detailViewController retrieves the doc. > Is the method used by the sample code a better design? If so, why? Seems like > an extra query. I agree; IMO it's better to pass the document. Probably even better to pass a model object. (It's probably not an extra query, though. CBLDatabase keeps an in-memory cache of CBLDocument objects, so -documentWithID: is a very cheap dictionary lookup if the CBLDocument with that ID is either already referenced elsewhere or has been used recently.) --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/EBD139DD-52AF-4E79-9D80-752855DBA34A%40couchbase.com. For more options, visit https://groups.google.com/groups/opt_out.
