jeffjenkins/MongoAlchemy — Issue #77: Document mongo_id usage
Author: recursify
Created: 2011-11-15 21:03:53+00:00
State: open

I'm not sure if this is a bug or not, but the usage of mongo_id is unclear to me.

I'd like a way to override the default _id for a mapped class

```python
class Foo(Document):
num	= IntField()
mongo_id = StringField()

session = Session.connect('mongoalchemy-intro')
f = Foo(num=10,	mongo_id='abc')
session.insert(f)
```

But this is what I see in the database:

```
> db.Foo.find()
{ "_id" : ObjectId("4ec2d34d22abca059e000000"), "mongo_id" : "abc", "num" : 10 }
```