Fix #1129, view embedding on capitalized table
- Now also works on camelCase fk column
This commit is contained in:
committed by
Steve Chávez
parent
ecf0e9213f
commit
105671e51a
@@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- #1113, Fix UPSERT failing when having a camel case PK column - @steve-chavez
|
||||
- #945, Fix slow start-up time on big schemas - @steve-chavez
|
||||
- #1129, Fix view embedding when table is capitalized - @steve-chavez
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -377,6 +377,9 @@ spec = do
|
||||
"books":[{"title":"The Little Prince"}]} ]|]
|
||||
{ matchHeaders = [matchContentTypeJson] }
|
||||
|
||||
it "works when having a capitalized table name and camelCase fk column" $
|
||||
get "/foos?select=*,bars(*)" `shouldRespondWith` 200
|
||||
|
||||
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`
|
||||
|
||||
Vendored
+2
@@ -84,6 +84,8 @@ GRANT ALL ON TABLE
|
||||
, jsonb_test
|
||||
, authors_books_number
|
||||
, authors_have_book_in_decade
|
||||
, foos
|
||||
, bars
|
||||
TO postgrest_test_anonymous;
|
||||
|
||||
GRANT INSERT ON TABLE insertonly TO postgrest_test_anonymous;
|
||||
|
||||
Vendored
+14
@@ -1522,3 +1522,17 @@ select
|
||||
ELSE false
|
||||
END AS has_book_in_sixties
|
||||
from private.authors x;
|
||||
|
||||
CREATE TABLE test."Foo"(
|
||||
id int primary key,
|
||||
name text
|
||||
);
|
||||
|
||||
CREATE TABLE test.bar(
|
||||
id int primary key,
|
||||
name text,
|
||||
"fooId" int references "Foo"(id)
|
||||
);
|
||||
|
||||
CREATE VIEW test.foos as select id,name from "Foo";
|
||||
CREATE VIEW test.bars as select id, "fooId", name from bar;
|
||||
|
||||
Reference in New Issue
Block a user