Skip to content

Commit

Permalink
deprecate: target embedding disambiguation
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-chavez committed Aug 10, 2023
1 parent 5ce020d commit e30bf53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- #2881, Fix error when a function returns `RECORD` or `SET OF RECORD` - @laurenceisla
- #2896, Fix applying superuser settings for impersonated role - @steve-chavez

### Deprecated

- #2863, Deprecate resource embedding target disambiguation - @steve-chavez
+ The `/table?select=*,other!fk(*)` must be used to disambiguate
+ The server aids in choosing the `!fk` by sending a `hint` on the error whenever an ambiguous request happens.

## [11.1.0] - 2023-06-07

### Added
Expand Down
2 changes: 2 additions & 0 deletions src/PostgREST/Plan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ findRel schema allRels origin target hint =
target == qiName relForeignTable && isO2M relCardinality
&& matchFKRefSingleCol hnt relCardinality -- auditor
else case hint of
-- DEPRECATED(remove after 2 major releases since v11.1.0): remove target
-- target = table / view / constraint / column-from-origin (constraint/column-from-origin can only come from tables https://github.com/PostgREST/postgrest/issues/2277)
-- DEPRECATED(remove after 2 major releases since v11.1.0): remove hint as table/view/columns and only leave it as constraint
-- hint = table / view / constraint / column-from-origin / column-from-target (hint can take table / view values to aid in finding the junction in an m2m relationship)
Nothing ->
-- /projects?select=clients(*)
Expand Down

0 comments on commit e30bf53

Please sign in to comment.