0

我有一个简单的查询:

Store.where( params[:conditions] || {}).all

在日志中,mongo mapper 似乎两次触发了相同的查询。

2013-07-28 14:01:05 - [DEBUG]:  MONGODB (0.7ms) db-development['stores'].find().
2013-07-28 14:01:05 - [DEBUG]:  MONGODB (0.5ms) db-development['stores'].find().

这对我来说似乎是一个错误。另请参阅https://github.com/jnunemaker/mongomapper/pull/467

显然,这个错误仍然没有修复..

有人知道我如何通过对数据库的单一访问来编写查询吗?

更新:

gem list

mongo_mapper (0.12.0)
plucky (0.5.2)

谢谢!!

4

1 回答 1

1

This is a known bug with Plucky 0.5.2. Try upgrading to MM 0.13.0.beta1, or using MM's master.

于 2013-07-29T05:41:29.830 回答