{"action":"created","issue":{"url":"https://api.github.com/repos/begriffs/postgrest/issues/475","labels_url":"https://api.github.com/repos/begriffs/postgrest/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/begriffs/postgrest/issues/475/comments","events_url":"https://api.github.com/repos/begriffs/postgrest/issues/475/events","html_url":"https://github.com/begriffs/postgrest/issues/475","id":129432195,"number":475,"title":"Restart required for detecting table relations on schema change","user":{"login":"sscarduzio","id":1327189,"avatar_url":"https://avatars.githubusercontent.com/u/1327189?v=3","gravatar_id":"","url":"https://api.github.com/users/sscarduzio","html_url":"https://github.com/sscarduzio","followers_url":"https://api.github.com/users/sscarduzio/followers","following_url":"https://api.github.com/users/sscarduzio/following{/other_user}","gists_url":"https://api.github.com/users/sscarduzio/gists{/gist_id}","starred_url":"https://api.github.com/users/sscarduzio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sscarduzio/subscriptions","organizations_url":"https://api.github.com/users/sscarduzio/orgs","repos_url":"https://api.github.com/users/sscarduzio/repos","events_url":"https://api.github.com/users/sscarduzio/events{/privacy}","received_events_url":"https://api.github.com/users/sscarduzio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-28T12:06:34Z","updated_at":"2016-01-30T09:04:51Z","closed_at":null,"body":"I have an `event_group` table with fields `group_id` and `event_id` referencing `events.id` and `groups.id`respectively.\r\n\r\nThe weird thing is that even if hydrating the event IDs  works perfectly: \r\n\r\n```\r\nGET /event_group?select=events{*}\r\n[\r\n  {\r\n    \"events\": {\r\n      \"doc\": {\r\n     ...\r\n       }\r\n  }\r\n]\r\n```\r\n\r\nWhen I try to do the same with `groups` , I receive this error:\r\n```\r\nGET  /event_group?select=groups{*}\r\n {\r\n  \"hint\": null,\r\n  \"details\": null,\r\n  \"code\": \"42703\",\r\n  \"message\": \"column groups.group_id does not exist\"\r\n}\r\n```\r\nwhy does it expect groups.group_id and not groups.id? I didn't need a event.event_id for events!\r\n \r\nHere's the SQL:\r\n\r\n```sql\r\n\r\nCREATE TABLE \"1\".event_group\r\n(\r\n  group_id character varying(32) NOT NULL,\r\n  event_id character varying(36),\r\n  CONSTRAINT fk_eid FOREIGN KEY (event_id) REFERENCES \"1\".events (id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE NO ACTION,\r\n  CONSTRAINT fk_groups FOREIGN KEY (group_id) REFERENCES \"1\".groups (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION,\r\n  CONSTRAINT uq_gid_eid UNIQUE (event_id, group_id)\r\n)\r\n\r\n\r\nCREATE TABLE \"1\".events\r\n(\r\n  doc jsonb,\r\n  id character varying(36) NOT NULL DEFAULT uuid_generate_v4(),\r\n  CONSTRAINT pkey_eid PRIMARY KEY (id)\r\n)\r\n\r\nCREATE TABLE \"1\".groups\r\n(\r\n  id character varying(32) NOT NULL DEFAULT uuid_generate_v4(),\r\n  name character varying(128) NOT NULL,\r\n  description character varying(800),\r\n  CONSTRAINT group_pkey PRIMARY KEY (id)\r\n)\r\n```"},"comment":{"url":"https://api.github.com/repos/begriffs/postgrest/issues/comments/177112167","html_url":"https://github.com/begriffs/postgrest/issues/475#issuecomment-177112167","issue_url":"https://api.github.com/repos/begriffs/postgrest/issues/475","id":177112167,"user":{"login":"nikita-volkov","id":1560937,"avatar_url":"https://avatars.githubusercontent.com/u/1560937?v=3","gravatar_id":"","url":"https://api.github.com/users/nikita-volkov","html_url":"https://github.com/nikita-volkov","followers_url":"https://api.github.com/users/nikita-volkov/followers","following_url":"https://api.github.com/users/nikita-volkov/following{/other_user}","gists_url":"https://api.github.com/users/nikita-volkov/gists{/gist_id}","starred_url":"https://api.github.com/users/nikita-volkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikita-volkov/subscriptions","organizations_url":"https://api.github.com/users/nikita-volkov/orgs","repos_url":"https://api.github.com/users/nikita-volkov/repos","events_url":"https://api.github.com/users/nikita-volkov/events{/privacy}","received_events_url":"https://api.github.com/users/nikita-volkov/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T09:04:50Z","updated_at":"2016-01-30T09:04:50Z","body":"@begriffs There actually is a PR from Leon Smith with that: https://github.com/nikita-volkov/hasql/pull/43/files . I just need to adapt it a little better."}}