{"action":"created","issue":{"url":"https://api.github.com/repos/begriffs/postgrest/issues/447","labels_url":"https://api.github.com/repos/begriffs/postgrest/issues/447/labels{/name}","comments_url":"https://api.github.com/repos/begriffs/postgrest/issues/447/comments","events_url":"https://api.github.com/repos/begriffs/postgrest/issues/447/events","html_url":"https://github.com/begriffs/postgrest/issues/447","id":125263304,"number":447,"title":"Using foreign key relationships for view","user":{"login":"matias-piin","id":15108415,"avatar_url":"https://avatars.githubusercontent.com/u/15108415?v=3","gravatar_id":"","url":"https://api.github.com/users/matias-piin","html_url":"https://github.com/matias-piin","followers_url":"https://api.github.com/users/matias-piin/followers","following_url":"https://api.github.com/users/matias-piin/following{/other_user}","gists_url":"https://api.github.com/users/matias-piin/gists{/gist_id}","starred_url":"https://api.github.com/users/matias-piin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matias-piin/subscriptions","organizations_url":"https://api.github.com/users/matias-piin/orgs","repos_url":"https://api.github.com/users/matias-piin/repos","events_url":"https://api.github.com/users/matias-piin/events{/privacy}","received_events_url":"https://api.github.com/users/matias-piin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-06T21:06:51Z","updated_at":"2016-01-07T15:56:53Z","closed_at":null,"body":"Hi,\r\n\r\nI'm trying to create a view and query it using postgREST but when I do it seems that all FK relationships are not there (fair enough). Is there a way to tell postgREST to look at the original table's FKs? Is there anyway to get around this?\r\n\r\nThe message I see is the following:\r\n```\r\n{\r\ndetails: \"no relation between <table> and <my_view>\",\r\nmessage: \"could not find foreign keys between these entities\"\r\n}\r\n```\r\n\r\nThank you!\r\nMatias"},"comment":{"url":"https://api.github.com/repos/begriffs/postgrest/issues/comments/169705926","html_url":"https://github.com/begriffs/postgrest/issues/447#issuecomment-169705926","issue_url":"https://api.github.com/repos/begriffs/postgrest/issues/447","id":169705926,"user":{"login":"matias-piin","id":15108415,"avatar_url":"https://avatars.githubusercontent.com/u/15108415?v=3","gravatar_id":"","url":"https://api.github.com/users/matias-piin","html_url":"https://github.com/matias-piin","followers_url":"https://api.github.com/users/matias-piin/followers","following_url":"https://api.github.com/users/matias-piin/following{/other_user}","gists_url":"https://api.github.com/users/matias-piin/gists{/gist_id}","starred_url":"https://api.github.com/users/matias-piin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matias-piin/subscriptions","organizations_url":"https://api.github.com/users/matias-piin/orgs","repos_url":"https://api.github.com/users/matias-piin/repos","events_url":"https://api.github.com/users/matias-piin/events{/privacy}","received_events_url":"https://api.github.com/users/matias-piin/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T15:56:53Z","updated_at":"2016-01-07T15:56:53Z","body":"Thanks for the quick reply, sorry it took so long to get back to you but im running into a problem while trying to simplify and reproduce this issue. I'm trying to create a simple case using a book and author table as this but I can't even get the basic relationships (without even a view) working now. Could you take a look and see if I'm doing something wrong? Thank you!\r\n\r\nSQL Query:\r\n\r\n```\r\nCREATE TABLE book\r\n(\r\nbook_id serial primary key,\r\nname varchar(255)\r\n);\r\n\r\nCREATE TABLE author\r\n(\r\nauthor_id serial primary key,\r\nbook_id serial not null references book(book_id),\r\nname varchar(255)\r\n);\r\n\r\nINSERT INTO book VALUES (1, 'My Book');\r\nINSERT INTO author VALUES (1, 1, 'John Cook');\r\n\r\nGRANT ALL ON TABLE book TO webapp;\r\nGRANT ALL ON TABLE author TO webapp;\r\n```\r\n\r\nIn this case if I use the following query: `/book?book_id=eq.1&select=book_id,name,author{*}`\r\n\r\nI get this result:\r\n```\r\n{\r\ndetails: \"no relation between author and book\",\r\nmessage: \"could not find foreign keys between these entities\"\r\n}\r\n```\r\n"}}