Skip to content

Instantly share code, notes, and snippets.

@jhannah
Last active March 22, 2017 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhannah/14f59e6d0c209da99e60afabd1704c3c to your computer and use it in GitHub Desktop.
Save jhannah/14f59e6d0c209da99e60afabd1704c3c to your computer and use it in GitHub Desktop.
PostgREST Resource embedding
UPDATE: THIS IS A KNOWN ISSUE:
https://github.com/begriffs/postgrest/issues/411
Remove the need for primary key column when embedding parents in &select
Remind me again: Is this a feature or a bug?
I HAVE TO add 'id' to my 'select=' even though I don't want it.
curl "$N/table1?select=field1,table2\{field2\}"
{
"code": "42703",
"details": null,
"hint": null,
"message": "column table1_table1.id does not exist"
}
curl "$N/table1?select=field1,table2\{id,field2\}"
{ works as expected }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment