[
https://issues.apache.org/jira/browse/COUCHDB-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806759#action_12806759
]
Paul Joseph Davis commented on COUCHDB-635:
-------------------------------------------
I can't seem to trigger any sort of weirdness using json2.js and couchjs. Do
you have any log output when you try and emit that?
For reference:
//test.js
print(JSON.stringify({"constructor": "foo"}));
var p = JSON.parse("{\"constructor\": \"foo\"}");
print(p);
print(JSON.stringify(p));
print(JSON.stringify({"foo": {"constructor": "baz"}}));
cat test.js | ./src/couchdb/priv/couchjs
Produces:
{"constructor":"foo"}
[object Object]
{"constructor":"foo"}
{"foo":{"constructor":"baz"}}
As expected.
> A document with a field named 'constructor' causes it to silently be excluded
> from any and all map views
> --------------------------------------------------------------------------------------------------------
>
> Key: COUCHDB-635
> URL: https://issues.apache.org/jira/browse/COUCHDB-635
> Project: CouchDB
> Issue Type: Bug
> Components: JavaScript View Server
> Affects Versions: 0.10.1
> Environment: Mac OS X 10.6.2, CouchDB 0.10.1
> Reporter: James Cash
> Priority: Minor
>
> If a document has a (nested) field named 'constructor', any map which
> attempts to emit the document will instead silently discard it.
> For example, the document
> { "_id": "CSC190H1S",
> "_rev": "32-287eec55e59305ee94129a0be940bf41",
> "outcomes": {
> "constructor": [
> "knowledge"
> ]
> }
> }
> will silently be excluded by any view which attempts to emit "doc" or
> "doc.outcomes" .
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.