Closed luca1197 closed 1 year ago
A simple query like this also fails:
select * from t order by db.t.pk;
@JCOR11599 is working on this and we'll try and get it fixed by latest tomorrow.
Hey @luca1197, thanks for reporting this bug. The fix for this has been merged to dolt main. Expect a release with the fix later today!
This issue actually led to the discovery of another related bug involving joining tables with the same name across different databases (currently working on that).
When trying to run this simple query in Dolt using Prisma:
Prisma generates this SQL query:
which causes Dolt to throw an error:
ERROR [no conn] unable to prepare query: column "firstName" could not be found in any table in scope {query=SELECT ...
.When manually replacing the
ORDER BY
statement with just the column name (ORDER BY database.tablename.firstName
→ORDER BY firstName
[backticks removed due to markdown formatting]), the query is working fine.Since ordering is a very common operation and there does not seem to be a good way to not use fully qualified table names on the Prisma-side, it would be great if Dolt would support this.