500 error when trying to filter a table by a linked field
Describe the bug I have a table that contains a link to another table. When attempting to filter by the linked field, I am getting a 500 error on my self hosted community edition.
To Reproduce Steps to reproduce the behavior:
- Go to a table that contains a linked field
- Click on 'Filter'
- Select the linked column
- Attempt to select a record or search for one in the textbox
Expected behavior I expected to be able to filter by values present in the linked table.
** Client (please complete the following information):**
- Mac OS
- Chrome
- 138.0.7204.184 (Official Build) (arm64)
Platform (Please tell us which deployment version you are using) docker on a linux machine using latest teable image from ghcr.
Additional context
Portion of the log: "message": "\nInvalid prisma.$queryRawUnsafe() invocation:\n\n\nRaw query failed. Code: 42702. Message: ERROR: column reference \"sample_id\" is ambiguous",
Some additional details. The error above I got on tables that were imported from .tea files, where all the dependent tables were present. I was able to get around that issue but changing the type of the column to text, and reverting back to link.
On non imported table, you don't get the issue of the values not being displayed.
However, for both imported and non imported tables in linked fields, the text serach box doesn't work and produces a 500 error.
Would appreciate any help in getting more details about this. Am I the only one experiencing this or this is an actual bug?
Same issue for me , here is temporary solution
Workaround
A simple workaround is to remove the column name ambiguity in your base.
- Identify the two tables involved in the link.
- Inspect the field names in both tables and find the name that is duplicated (e.g.,
Label). - Rename the field in one of the tables to make it unique (e.g., change
LabeltoProject Name).
This resolves the ambiguity at the database schema level and allows the search to function correctly.