{"action":"opened","issue":{"url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1386","repository_url":"https://api.github.com/repos/MongoEngine/mongoengine","labels_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1386/labels{/name}","comments_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1386/comments","events_url":"https://api.github.com/repos/MongoEngine/mongoengine/issues/1386/events","html_url":"https://github.com/MongoEngine/mongoengine/issues/1386","id":182724383,"number":1386,"title":"Is it possible to reference a embedded document itself inside the class?","user":{"login":"Jeffwhen","id":9495883,"avatar_url":"https://avatars.githubusercontent.com/u/9495883?v=3","gravatar_id":"","url":"https://api.github.com/users/Jeffwhen","html_url":"https://github.com/Jeffwhen","followers_url":"https://api.github.com/users/Jeffwhen/followers","following_url":"https://api.github.com/users/Jeffwhen/following{/other_user}","gists_url":"https://api.github.com/users/Jeffwhen/gists{/gist_id}","starred_url":"https://api.github.com/users/Jeffwhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jeffwhen/subscriptions","organizations_url":"https://api.github.com/users/Jeffwhen/orgs","repos_url":"https://api.github.com/users/Jeffwhen/repos","events_url":"https://api.github.com/users/Jeffwhen/events{/privacy}","received_events_url":"https://api.github.com/users/Jeffwhen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-13T08:20:01Z","updated_at":"2016-10-13T08:20:01Z","closed_at":null,"body":"I am trying to store a tree structrue here.\r\n```python\r\nclass TreeNode(EmbeddedDocument):\r\n    nodeId = SequenceField()\r\n    children = ListField(EmbeddedDocument(TreeNode))\r\n```\r\nDjango complained that TreeNode is not decleared. So I changed it into:\r\n```python\r\nclass TreeNode(EmbeddedDocument):\r\n    nodeId = SequenceField()\r\nTreeNode.children = ListField(EmbeddedDocument(TreeNode))\r\n```\r\nNow mongoengine throws a Error:\r\n```\r\nAttributeError: 'EmbeddedDocument' object has no attribute '_is_document'\r\n```\r\nIs it possible to do what I want to do? Or maybe I'm in the wrong track?"}}
{"actor":{"display_login":"Jeffwhen"}}