开发者

MongoMapper examine query

How I can check w开发者_C百科hich query will be send to the MongoDB server when I call a certain association on my model from the Rails console ?


turn on MongoMapper logging in your connection string (typically in an initializer file):

MongoMapper.connection = Mongo::Connection.new('localhost', 27017, :logger => Rails.logger) #the logger param does the trick
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜