{"action":"created","issue":{"url":"https://api.github.com/repos/potatolondon/djangae/issues/32","labels_url":"https://api.github.com/repos/potatolondon/djangae/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/potatolondon/djangae/issues/32/comments","events_url":"https://api.github.com/repos/potatolondon/djangae/issues/32/events","html_url":"https://github.com/potatolondon/djangae/issues/32","id":38533917,"number":32,"title":"ForeignKey with 'self' causes a join and breaks","user":{"login":"kirberich","id":941715,"avatar_url":"https://avatars.githubusercontent.com/u/941715?v=3","gravatar_id":"","url":"https://api.github.com/users/kirberich","html_url":"https://github.com/kirberich","followers_url":"https://api.github.com/users/kirberich/followers","following_url":"https://api.github.com/users/kirberich/following{/other_user}","gists_url":"https://api.github.com/users/kirberich/gists{/gist_id}","starred_url":"https://api.github.com/users/kirberich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirberich/subscriptions","organizations_url":"https://api.github.com/users/kirberich/orgs","repos_url":"https://api.github.com/users/kirberich/repos","events_url":"https://api.github.com/users/kirberich/events{/privacy}","received_events_url":"https://api.github.com/users/kirberich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/potatolondon/djangae/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/potatolondon/djangae/milestones/1","html_url":"https://github.com/potatolondon/djangae/milestones/Beta","labels_url":"https://api.github.com/repos/potatolondon/djangae/milestones/1/labels","id":830326,"number":1,"title":"Beta","description":null,"creator":{"login":"Kazade","id":16649,"avatar_url":"https://avatars.githubusercontent.com/u/16649?v=3","gravatar_id":"","url":"https://api.github.com/users/Kazade","html_url":"https://github.com/Kazade","followers_url":"https://api.github.com/users/Kazade/followers","following_url":"https://api.github.com/users/Kazade/following{/other_user}","gists_url":"https://api.github.com/users/Kazade/gists{/gist_id}","starred_url":"https://api.github.com/users/Kazade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kazade/subscriptions","organizations_url":"https://api.github.com/users/Kazade/orgs","repos_url":"https://api.github.com/users/Kazade/repos","events_url":"https://api.github.com/users/Kazade/events{/privacy}","received_events_url":"https://api.github.com/users/Kazade/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":20,"state":"open","created_at":"2014-10-17T14:32:38Z","updated_at":"2015-06-12T10:51:19Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2014-07-23T14:27:05Z","updated_at":"2015-06-23T11:12:51Z","closed_at":null,"body":"```\r\nclass SampleModel(models.Model):\r\n    related_field = models.ForeignKey('self', null=True, blank=True)\r\n\r\nobj = SampleModel()\r\nobj2 = SampleModel(related_field=obj)\r\n\r\nobj.samplemodel_set.all()\r\n```\r\n\r\nResults in\r\n```\r\n*** NotSupportedError: \r\nThe appengine database connector does not support JOINs. The requested join map follows\r\n {(u'simple_search_samplemodel', u'simple_search_samplemodel', 'related_field_id', u'id'): ('T2',), (None, u'simple_search_samplemodel', None, None): (u'simple_search_samplemodel',)}\r\n```\r\n\r\nI'll try and have a go at this later."},"comment":{"url":"https://api.github.com/repos/potatolondon/djangae/issues/comments/114446616","html_url":"https://github.com/potatolondon/djangae/issues/32#issuecomment-114446616","issue_url":"https://api.github.com/repos/potatolondon/djangae/issues/32","id":114446616,"user":{"login":"adamalton","id":270255,"avatar_url":"https://avatars.githubusercontent.com/u/270255?v=3","gravatar_id":"","url":"https://api.github.com/users/adamalton","html_url":"https://github.com/adamalton","followers_url":"https://api.github.com/users/adamalton/followers","following_url":"https://api.github.com/users/adamalton/following{/other_user}","gists_url":"https://api.github.com/users/adamalton/gists{/gist_id}","starred_url":"https://api.github.com/users/adamalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamalton/subscriptions","organizations_url":"https://api.github.com/users/adamalton/orgs","repos_url":"https://api.github.com/users/adamalton/repos","events_url":"https://api.github.com/users/adamalton/events{/privacy}","received_events_url":"https://api.github.com/users/adamalton/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T11:12:51Z","updated_at":"2015-06-23T11:12:51Z","body":"I think that actually the problem here is that you're using the standard\ndjango.contrib.auth.models.User model, rather than one of the\ndjangae.contrib.gauth models.  See\nhttps://djangae.readthedocs.org/en/latest/gauth/.\n\nAdam\n\nOn 31 May 2015 at 05:51, Julio Brito <notifications@github.com> wrote:\n\n> Hello, I am trying to use Django admin when i clicking in a user then it\n> happens\n>\n> NotSupportedError at /admin/auth/user/6561971293913088/\n>\n> The appengine database connector does not support JOINs. The requested\n> join map follows\n>\n> {(u'auth_group', u'auth_user_groups', ((u'id', u'group_id'),)):\n> (u'auth_user_groups',), (None, u'auth_group', None): (u'auth_group',),\n> (u'auth_user_groups', u'auth_user', ((u'user_id', u'id'),)):\n> (u'auth_user',)}\n>\n> djangae\\db\\backends\\appengine\\commands.py in execute, line 665\n>\n> i found something here\n> https://cloud.google.com/appengine/docs/java/datastore/jpa/overview\n>\n> You can override the read policy and call deadline for an individual Query\n> object. To override the read policy for a Query, call its setHint() method\n> as follows:\n>\n>     Query q = em.createQuery(\"select from \" + Book.class.getName());\n>     q.setHint(\"datanucleus.appengine.datastoreReadConsistency\", \"EVENTUAL\");\n>\n> As above, the possible values are \"EVENTUAL\" and \"STRONG\".\n>\n> To override the read timeout, call setHint() as follows:\n>\n>     q.setHint(\"javax.persistence.query.timeout\", 3000);\n>\n> There is no way to override the configuration for these options when you\n> fetch entities by key.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/potatolondon/djangae/issues/32#issuecomment-107127996>\n> .\n>\n"}}