MongoKit's callable object has no attribute 'find_and_modify' <p>I'm using MongoKit as ODM framework. I have object User:</p> <pre><code>class User(Document): __collection__ = 'users' ... </code></pre> <p>There is no <code>__database__</code> here - I'm using different ones depend on current profile (development, testing etc.) I use queries like this to access data:</p> <pre><code>app.db.User.one({'email_confirmation_token.hex': token_hex}) </code></pre> <p>It works fine. Now I need to use find_and_modify command. According to <a href="http://namlook.github.com/mongokit/update.html#find-and-modify" rel="nofollow">documentation</a>, I should call this method from collection to get dict or from object to get object.</p> <p>This call works:</p> <pre><code>app.db.users.find_and_modify({'email_confirmation_token.hex': token_hex}, {'$set': {'active': True}}) </code></pre> <p>but this - doesn't:</p> <pre><code>app.db.User.find_and_modify({'email_confirmation_token.hex': token_hex}, {'$set': {'active': True}}) </code></pre> <p>Error message is: <strong>AttributeError: 'CallableUser' object has no attribute 'find_and_modify'</strong>.</p> <p>Why it doesn't contain this attribute?</p>