Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disambiguates find query after patch #199

Merged

Conversation

coreysan
Copy link
Contributor

Tell us about the problem your pull request is solving.

When modifying the params.knex query with a join that introduces an ambiguous primary key, PATCH requests will fail with an ambiguous column error:

BadRequest: 
  select `animals`.* 
  from `animals` 
    left join `animals` as `ancestors` on `ancestors`.`id` = `animals`.`ancestor_id` 
  where `id` in (2) - SQLITE_ERROR: ambiguous column name: id

To fix, the table is specified in the Patch request (see code in MR)

Are there any open issues that are related to this?

Not really. There's this: #164
But it's stale and only related in that it concerns the same service method.

Is this PR dependent on PRs in other repos?

No

@coreysan coreysan force-pushed the adds-table-alias-to-patch-method branch from 43f761c to ca9aa67 Compare April 16, 2019 19:09
@daffl daffl merged commit e05e093 into feathersjs-ecosystem:master Apr 16, 2019
@daffl
Copy link
Member

daffl commented Apr 16, 2019

Released as v5.0.7 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants