-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Column name must be quoted #829
Labels
bug
breakages in functionality that is implemented
Comments
@sanami would you like to get a PR in with this fix? |
On it in #830 |
01navneet
added a commit
to 01navneet/administrate
that referenced
this issue
Apr 13, 2017
iarie
pushed a commit
to iarie/administrate
that referenced
this issue
Jun 17, 2017
* Add table name to search query Problem: When default scopes with joins are used, the generated search query can lead to ambiguity. For instance, the column `id` may exist in two tables, which will lead to a SQL error when it is impossible to decide which table to use. Solution: Add `resource_class`'s `table_name` to the generated search query. This ensures that the generated query produces the format `table_name.id` instead of `id` in the where clause generated for the search. * Quote table and column name in search Closes thoughtbot#829
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search fails in postgres if any column name is not all downcased/
https://github.com/thoughtbot/administrate/blob/master/lib/administrate/search.rb#L23
it should be
https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
The text was updated successfully, but these errors were encountered: