{"action":"created","issue":{"url":"https://api.github.com/repos/web2py/pydal/issues/258","labels_url":"https://api.github.com/repos/web2py/pydal/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/web2py/pydal/issues/258/comments","events_url":"https://api.github.com/repos/web2py/pydal/issues/258/events","html_url":"https://github.com/web2py/pydal/issues/258","id":95325259,"number":258,"title":"Key error when defining reference to table before table definition","user":{"login":"evan54","id":10644399,"avatar_url":"https://avatars.githubusercontent.com/u/10644399?v=3","gravatar_id":"","url":"https://api.github.com/users/evan54","html_url":"https://github.com/evan54","followers_url":"https://api.github.com/users/evan54/followers","following_url":"https://api.github.com/users/evan54/following{/other_user}","gists_url":"https://api.github.com/users/evan54/gists{/gist_id}","starred_url":"https://api.github.com/users/evan54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evan54/subscriptions","organizations_url":"https://api.github.com/users/evan54/orgs","repos_url":"https://api.github.com/users/evan54/repos","events_url":"https://api.github.com/users/evan54/events{/privacy}","received_events_url":"https://api.github.com/users/evan54/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-16T01:17:48Z","updated_at":"2015-07-16T09:03:32Z","closed_at":null,"body":"This is a problem I found documented elsewhere but I experienced it when I upgraded to 2.11.2\r\n\r\nThe problem was mentioned here:\r\n\r\nhttps://groups.google.com/forum/#!topic/web2py/58aG2cdzk8s\r\n\r\nbasically when you define a reference to a table with 'reference tablename' before you define the table. eg:\r\n\r\ndb.define_table( 'dogs' , Field( 'owner' , 'reference people' ) )\r\ndb.define_table( 'people' , Field( 'name' ) )"},"comment":{"url":"https://api.github.com/repos/web2py/pydal/issues/comments/121888503","html_url":"https://github.com/web2py/pydal/issues/258#issuecomment-121888503","issue_url":"https://api.github.com/repos/web2py/pydal/issues/258","id":121888503,"user":{"login":"gi0baro","id":5019985,"avatar_url":"https://avatars.githubusercontent.com/u/5019985?v=3","gravatar_id":"","url":"https://api.github.com/users/gi0baro","html_url":"https://github.com/gi0baro","followers_url":"https://api.github.com/users/gi0baro/followers","following_url":"https://api.github.com/users/gi0baro/following{/other_user}","gists_url":"https://api.github.com/users/gi0baro/gists{/gist_id}","starred_url":"https://api.github.com/users/gi0baro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gi0baro/subscriptions","organizations_url":"https://api.github.com/users/gi0baro/orgs","repos_url":"https://api.github.com/users/gi0baro/repos","events_url":"https://api.github.com/users/gi0baro/events{/privacy}","received_events_url":"https://api.github.com/users/gi0baro/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T09:03:32Z","updated_at":"2015-07-16T09:03:32Z","body":"@evan54 What's the point of defining `people` table after? Just define it first."}}