{"action":"created","issue":{"url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/949","labels_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/949/labels{/name}","comments_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/949/comments","events_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/949/events","html_url":"https://github.com/MongoEngine/mongoengine/issues/949","id":67336854,"number":949,"title":"problems with using operators names as field name","user":{"login":"elephanter","id":1132736,"avatar_url":"https://avatars.githubusercontent.com/u/1132736?v=3","gravatar_id":"","url":"https://api.github.com/users/elephanter","html_url":"https://github.com/elephanter","followers_url":"https://api.github.com/users/elephanter/followers","following_url":"https://api.github.com/users/elephanter/following{/other_user}","gists_url":"https://api.github.com/users/elephanter/gists{/gist_id}","starred_url":"https://api.github.com/users/elephanter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elephanter/subscriptions","organizations_url":"https://api.github.com/users/elephanter/orgs","repos_url":"https://api.github.com/users/elephanter/repos","events_url":"https://api.github.com/users/elephanter/events{/privacy}","received_events_url":"https://api.github.com/users/elephanter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MongoEngine/mongoengine/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/MongoEngine/mongoengine/milestones/17","html_url":"https://github.com/MongoEngine/mongoengine/milestones/0.10","labels_url":"https://api.github.com/repos/MongoEngine/mongoengine/milestones/17/labels","id":1098863,"number":17,"title":"0.10","description":"","creator":{"login":"MRigal","id":2190327,"avatar_url":"https://avatars.githubusercontent.com/u/2190327?v=3","gravatar_id":"","url":"https://api.github.com/users/MRigal","html_url":"https://github.com/MRigal","followers_url":"https://api.github.com/users/MRigal/followers","following_url":"https://api.github.com/users/MRigal/following{/other_user}","gists_url":"https://api.github.com/users/MRigal/gists{/gist_id}","starred_url":"https://api.github.com/users/MRigal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MRigal/subscriptions","organizations_url":"https://api.github.com/users/MRigal/orgs","repos_url":"https://api.github.com/users/MRigal/repos","events_url":"https://api.github.com/users/MRigal/events{/privacy}","received_events_url":"https://api.github.com/users/MRigal/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":1,"state":"open","created_at":"2015-05-06T16:17:07Z","updated_at":"2015-05-07T09:47:47Z","due_on":"2015-06-05T22:00:00Z","closed_at":null},"comments":7,"created_at":"2015-04-09T11:03:37Z","updated_at":"2015-05-07T09:47:47Z","closed_at":"2015-05-07T09:47:47Z","body":"Why I can't use field name like \"gte\", or \"type\"?\r\n\r\nMongoengine automatically translate my request \r\nMyDocument.objects(item__type=\"axe\") to request {item:{$type:\"axe\"}}\r\n\r\nexample:\r\n\r\n    from mongoengine import Document, EmbeddedDocument, EmbeddedDocumentField, StringField\r\n    from mongoengine import connect\r\n    connect('test')\r\n\r\n    class EmbeddedItem(EmbeddedDocument):\r\n        type = StringField()\r\n\r\n    class Doc(Document):\r\n        item = EmbeddedDocumentField(EmbeddedItem)\r\n\r\n    Doc.drop_collection()\r\n\r\n    doc = Doc(item=EmbeddedItem(type=\"axe\"))\r\n    doc.save()\r\n\r\n    print Doc.objects(item__type=\"axe\").count()\r\n\r\n\r\nthrows an exception\r\n\r\n    pymongo.errors.OperationFailure: command SON([('count', u'doc'), ('fields', None), ('query', {'item':{'$type': 'axe'}})]) on namespace kkrm.$cmd failed: exception: $type has to be a number\r\n\r\n\r\nMaybe i don't know how to make this work?"},"comment":{"url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/comments/99797148","html_url":"https://github.com/MongoEngine/mongoengine/issues/949#issuecomment-99797148","issue_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/949","id":99797148,"user":{"login":"MRigal","id":2190327,"avatar_url":"https://avatars.githubusercontent.com/u/2190327?v=3","gravatar_id":"","url":"https://api.github.com/users/MRigal","html_url":"https://github.com/MRigal","followers_url":"https://api.github.com/users/MRigal/followers","following_url":"https://api.github.com/users/MRigal/following{/other_user}","gists_url":"https://api.github.com/users/MRigal/gists{/gist_id}","starred_url":"https://api.github.com/users/MRigal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MRigal/subscriptions","organizations_url":"https://api.github.com/users/MRigal/orgs","repos_url":"https://api.github.com/users/MRigal/repos","events_url":"https://api.github.com/users/MRigal/events{/privacy}","received_events_url":"https://api.github.com/users/MRigal/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T09:47:47Z","updated_at":"2015-05-07T09:47:47Z","body":"Merged PR"}}