On Thu, Dec 18, 2008 at 9:09 AM, Daniel DeLeo <[email protected]> wrote: > I wasn't expecting these attributes to be saved, just returned (emitted). > And I'll trust that docs are frozen before getting to the map function for > good reason.
Deep copy would work. Still I think a deep copy of only the necessary fields (as in my example) is good practice. Rarely in your application will you need the whole document in the value of a view. By emitting only the necessary data you'll get better performance and I think cleaner application design. There is also the include_docs query option, which is useful if you occasionally want to access the doc, but usually just need what's available in the value. (If you really do nearly always need the whole doc(s) on view-range queries, it may be better to continue to emit it in the value...) -- Chris Anderson http://jchris.mfdz.com
