{"action":"created","issue":{"url":"https://api.github.com/repos/robinedwards/neomodel/issues/160","labels_url":"https://api.github.com/repos/robinedwards/neomodel/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/robinedwards/neomodel/issues/160/comments","events_url":"https://api.github.com/repos/robinedwards/neomodel/issues/160/events","html_url":"https://github.com/robinedwards/neomodel/issues/160","id":86299067,"number":160,"title":"Issue in custom init while using get","user":{"login":"siddharthm","id":985879,"avatar_url":"https://avatars.githubusercontent.com/u/985879?v=3","gravatar_id":"","url":"https://api.github.com/users/siddharthm","html_url":"https://github.com/siddharthm","followers_url":"https://api.github.com/users/siddharthm/followers","following_url":"https://api.github.com/users/siddharthm/following{/other_user}","gists_url":"https://api.github.com/users/siddharthm/gists{/gist_id}","starred_url":"https://api.github.com/users/siddharthm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siddharthm/subscriptions","organizations_url":"https://api.github.com/users/siddharthm/orgs","repos_url":"https://api.github.com/users/siddharthm/repos","events_url":"https://api.github.com/users/siddharthm/events{/privacy}","received_events_url":"https://api.github.com/users/siddharthm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-08T19:23:55Z","updated_at":"2015-06-10T18:07:11Z","closed_at":null,"body":"Since neomodel does not have any auto incrementing id, I decided to create an IntegerField called id and set its value to current count of that node class + 1. For this I overwrote the init class as in given example:\r\n```python\r\nclass NodeClass:\r\n     id = neomodel.IntegerProperty()\r\n     # more fields ...\r\n     def __init__(self,*args,**kwargs):\r\n          if id not in kwargs: \r\n              kwargs[\"id\"] = len(NodeClass.nodes) + 1\r\n          super(NodeClass,self).__init__(self,*args,**kwargs)\r\n     \r\n```\r\nWhen I create a new instance of this NodeClass, everything is fine ( id is also set correctly).\r\nBut when I try to use the get method as \r\n```python\r\nNodeClass.nodes.get(id=123)\r\n```\r\nI get the following exception:\r\n```\r\nsuper(type, obj): obj must be an instance or subtype of type\r\n```\r\n\r\nP.S provided the code sample so just to make sure that I am not doing anything wrong instead of neomodel\r\n"},"comment":{"url":"https://api.github.com/repos/robinedwards/neomodel/issues/comments/110858676","html_url":"https://github.com/robinedwards/neomodel/issues/160#issuecomment-110858676","issue_url":"https://api.github.com/repos/robinedwards/neomodel/issues/160","id":110858676,"user":{"login":"bleib1dj","id":524842,"avatar_url":"https://avatars.githubusercontent.com/u/524842?v=3","gravatar_id":"","url":"https://api.github.com/users/bleib1dj","html_url":"https://github.com/bleib1dj","followers_url":"https://api.github.com/users/bleib1dj/followers","following_url":"https://api.github.com/users/bleib1dj/following{/other_user}","gists_url":"https://api.github.com/users/bleib1dj/gists{/gist_id}","starred_url":"https://api.github.com/users/bleib1dj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleib1dj/subscriptions","organizations_url":"https://api.github.com/users/bleib1dj/orgs","repos_url":"https://api.github.com/users/bleib1dj/repos","events_url":"https://api.github.com/users/bleib1dj/events{/privacy}","received_events_url":"https://api.github.com/users/bleib1dj/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T18:07:11Z","updated_at":"2015-06-10T18:07:11Z","body":"@siddharthm We'll get something setup that we can discuss that and additional ongoing questions relating to the project.\r\n\r\n@robinedwards do you know of a way to solve @siddharthm current question? I have a couple solutions that I'm not sure already exist within neomodel but am also unsure the performance repercussions of not indicating direction of the relationship (which may not matter in the use case)."}}