I think you might be running into the "Linked Document" feature:

http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views#Keys_and_values
(Search for "Linked Document" on that page...)

I'm guessing there isn't another document in the database with the ID
"efg", right?

On Wed, Jul 21, 2010 at 5:25 PM, Cory Zue <[email protected]> wrote:
> I have a strange problem that I *think* is a bug in couchdb.
>
> I have a document with a child property, that itself has an _id field:
>
> {
>  _id : "abc",
>  child: { _id: "efg",
>           somethingelse: 5 }
> }
>
> then I have a view that's emitting the children as objects:
>
> function (doc) {
>  if (doc.child) {
>        emit(doc.child._id, doc.child);
>  }
> }
>
> This works fine, but when I query the view with include_docs=true it
> still returns null for the doc.  However, if I lookup the doc by id it
> is there.
>
> Is this a known problem?  Am I doing something wrong or illegal?
>
> This is in .11, I haven't tested in 1.0 yet.
>
> thanks,
> Cory
>

Reply via email to