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

Problem using column names like 'first_table_of_join.column_name' when working with joined tables in Filters 'LIKE' (Contains) and possible solutions #93

Open
alansgonzaga opened this issue Oct 30, 2024 · 0 comments

Comments

@alansgonzaga
Copy link

alansgonzaga commented Oct 30, 2024

Hi!
I got some errors with purity filters that are implementing LIKE queries (usualy CONTAINS FILTER), when I'm working with joined tables that has identical column names and that I need to send table name along with the column like (first_table_of_join.column_name).

I checked that purity use on ContainsFilter $query->whereRaw("{$this->column}...
image

In this case, when I send an "column" (first_table_of_join.column_name), the query are being assembly first_table_of_join.column_name instead of first_table_of_join.column_name, and sql throw error.

So I solved here in this way:
image

Do you guys see some scenario it wont work?
Maybe should we think other solution?

Replicated this to all these:
image

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

No branches or pull requests

1 participant