couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Mielicki (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-925) altering 'doc' variable in map function affects other map functions
Date Sat, 19 Feb 2011 23:21:38 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996930#comment-12996930
] 

Lukasz Mielicki commented on COUCHDB-925:
-----------------------------------------

Seems to still break with:
    delete doc._rev; 
    delete doc._id;


> altering 'doc' variable in map function affects other map functions
> -------------------------------------------------------------------
>
>                 Key: COUCHDB-925
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-925
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>         Environment: Erlang R13B03, Spidermonkey 1.7, Ubuntu 10.04
>            Reporter: afters
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-925.patch
>
>
> I have the following two map functions (v1.0.1):
> function (doc) {
>   emit(doc.path[0], null);
> }
> function (doc) {
>  doc.path = [ 'an intruder from another view' ];
> }
> When the views are built, the first map function sees a 'doc' variable that
> was changed by the second map function, and thus emits the key 'an intruder
> from another view'.
> The real documents remain untouched.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message