couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Somers <somers....@gmail.com>
Subject Re: View with datetime values
Date Fri, 03 Apr 2009 11:46:15 GMT
Hi guys,

Okay, I found what's going on. Calling the "emit" function passes the
object's reference, so if I alter the object afterwards, the emited value
gets altered with it. I fixed it by changing
emit([doc.monitorID, doc.LocDateTime], subDateTime);
to
emit([doc.monitorID, doc.LocDateTime], eval(uneval(subDateTime)));
which seems to work.

This does leave me with a question: is this intended behavior? If so, maybe
it should at least be mentioned in the docs?

Thanks
Tim

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message