using where on the find() method in order to query database generate lower case query
When i describe the database columns in the Wt::Dbo::field i am using a camel case like this:
Wt::Dbo::field(a, Test, "Test");
but when i query the database like this:
find().where("Test = ?").bind("hello");
i get an exception that says that the column name test doesn't exists (you can see that the column name is lowercase).
When i change the column name to lowercase it works.
So the but seems to be in the find<>().where() method where it lowercase the query string.
Updated by Koen Deforche over 7 years ago
- Tracker changed from Bug to Support
- Status changed from New to Resolved
SQL is case-sensitive only when you put column names between quotes. Wt::Dbo will use column names between quotes to make sure that it works, even if they collide with SQL keywords.
The draw-back is that you need to use quotes if your column names aren't all lower-case: .where("\"Test\\" = ?\")