开发者

Failing updates after upgrade to mongodb and mongoid

I have recently upgraded mongoid from 2.0.2 to 2.2.0 and mongodb from 1.8.1 to 1.8.3. After the upgrade I am facing weird issues while updating the user doument, which embeds a lot of other documents. For details, please see mongoid google group discussion

There are two cases I have identified which fail consistently,

  • First involves, using accept_nested_attributes_for for a embeds_many and deleting one embedded document and adding other. In this situation mongoid tries to pull and push to the user document in a single update call, which mongodb whines about in logs(verbose=true).
  • Second involves, deeply embedded documents. Mongoid tries to push embedded document and set the deeply embedded document in a single update call, which mongodb whines about again.

I have created the gist for easy recreation and logging info.

Any help is much appreciated.

Update:

It has been accepted as a confirmed bug in mongoid 2.2.0 and set to be solved in 2.2.1. For now开发者_如何学编程 reverting back to 2.0.2 solved my problem.

This issue has been fixed in latest mongoid.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜