Actions
Bug #8730
openUnexpected "order by (SELECT NULL)" when setting a limit
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/24/2021
Due date:
% Done:
0%
Estimated time:
Description
Code:
return session()->find<Model::Falukant::Predefine::FirstName>()
.where("\"name\" = ?")
.bind(tr)
.limit(1);
Created Query:
select "id", "version", "name" from "FALUKANT_PREDEFINE"."firstname" where ("name" = ?) order by (select null) offset 0 rows fetch first (?) rows only
I don't expect an "order by" when I don't add it.
Without the limit(1), the "order by..." is also not set.
Updated by Korneel Dumon almost 4 years ago
I think one of the back-ends requires it. Does it cause problems for you?
Updated by Torsten Schulz almost 4 years ago
Korneel Dumon wrote in #note-1:
I think one of the back-ends requires it. Does it cause problems for you?
I really had problems with it, because without print the SQL, I wouldn't know about that. I spend a lot of time into find the reason of an query that was working in cli wasn't working in Wt DBO.
Actions