我有一个简单的查询:
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)
谢谢!!