BlackLabs / play-morphia

Provide mongodb access service to play.db.Model via Morphia
Apache License 2.0
130 stars 49 forks source link

Model.cloud() function error #105

Closed anthony-legay closed 11 years ago

anthony-legay commented 11 years ago

Okay, I just tried to use the cloud() Model function and I think I identified a bug when I read the source code. On line 1610 of the Model class, the map function (js string) is formatted with the "field" parameter with %s, two times, but at the end of the function, there is still "emit(this.tags[index], 1)"

I don't think this is normal, at least, it's useless to provide a field parameter and not using it in the end.

In my opinion, it should look like "emit(this.%s[index], 1)".