Fix #1242, embed a view having a select in a where

This commit is contained in:
steve-chavez
2019-03-09 16:03:26 -05:00
committed by Steve Chávez
parent 7c376d6e84
commit 1f513f24a5
5 changed files with 25 additions and 2 deletions
+5
View File
@@ -433,6 +433,11 @@ spec = do
{"number_of_projects":2,"client":{"name":"Apple"}}] |]
{ matchHeaders = [matchContentTypeJson] }
it "can embed a view that has a subselect containing a select in a where" $
get "/authors_w_entities?select=name,entities,books(title)&id=eq.1" `shouldRespondWith`
[json| [{"name":"George Orwell","entities":[3, 4],"books":[{"title":"1984"}]}] |]
{ matchHeaders = [matchContentTypeJson] }
describe "path fixed" $ do
it "works when requesting children 2 levels" $
get "/clients?id=eq.1&select=id,projects:projects.client_id(id,tasks(id))" `shouldRespondWith`