I am using a ExtJS frontend and for a back end I'm using django, mongodb, and mongoengine (ORM - between the two). Everything works until i decide to shard my mongo database, turns out db.eval() (uses datbase to run commands) doesn't work with a sharded database. So I have to switch out the ORM.
I found several other ORMS such as mongokit and mongoalchemy, however I do not want to go through each individual ORM and hope that it works after changing all the commands from the recent ORM to the new one. Does anyone know a Mongo ORM that doesn't use db.eval() or works with a sharded mongo database?
Thank you
db.eval()? There might be a way to refactor that code to work with a shared system...db.evalwill not work on sharded collections, but this is a limitation of MongoDB itself, not of Mongoengine. See Sharding Limits for details.db.evalto be run against sharded collections. This is not a limitation of Mongoengine, but of MongoDB itself. Thus you won't be able to find an ORM/ODM which will let you do this. However, if you can describe what you ultimately want to accomplish, there may be another way to go about it that will work on sharded collections.db.evalfor theexec_js()method, not for any others. If you don't use that in your own code, you can use Mongoengine just fine with sharding.