Open lambmj opened 11 years ago
Is this talking to a CouchDB server, not TouchDB?
The JSON returned by the query is weird — I didn't think the doc
property could be null
.
Also, I don't think I've ever heard of an include_deleted
query param. It's not described anywhere in the CouchDB wiki.
Yes, it's a CouchDB 1.2.1 server. I saw the include_deleted in a post on Stack Overflow. It didn't matter -- I got the same results either way
My code:
crashes on the last line with this error when retrieving a deleted document from CouchDB:
The cause appears to be that
CouchQueryRow
doesn't check to see ifdocument
isnull
before attempting to retrieve properties from it in this (and other) code inCouchQuery.m
The raw query retrieves rows for deleted documents even if
include_deleted
isfalse
:It's not clear to me if the best fix is to patch the calls and add a
deleted
property toCouchQueryRow
or ifCouchQuery
should not return this row in the first place.