Log message #4261706

# At Username Text
# Apr 22nd 2021, 19:22 umer936 Don't think so. DebugKit, TinyAuth, Tools, and Migrations
# Apr 22nd 2021, 19:21 kevin.pfeifer could it be that you have some sort of plugin active that does the lowercase conversion?
# Apr 22nd 2021, 19:20 mehov @admad ok thank you, one more question please, can I somehow connect this standalone plugin to an actual app sitting in a different folder on the same server? I want to work on the plugin and see the changes right away, without committing and pushing them to the git server, and then downloading to the app via composer just to confirm it works
# Apr 22nd 2021, 19:19 umer936 Not easily
# Apr 22nd 2021, 19:18 kevin.pfeifer do you have xdebug available and/or a local setup where you can step through the code?
# Apr 22nd 2021, 19:17 admad @mehov bake in app and move, or finish your baking before making it standalone
# Apr 22nd 2021, 19:16 umer936 Another thing is the Model Name is EngineeringsTable, but the table is named engineering. That was not a problem doing a find()->count() so setup seems correct there
# Apr 22nd 2021, 19:15 mehov @admad okay, but then how do I bake models into this standalone plugin? Or do I bake models into a plugin inside a generic app, and then move them into this standalone plugin?
# Apr 22nd 2021, 19:15 umer936 which doesnt match debugkit Sql Log
# Apr 22nd 2021, 19:15 umer936 So the $query->sql() looks correct, with the capital tablename
# Apr 22nd 2021, 19:14 umer936 oh didn't know that. but no i dont have that set
# Apr 22nd 2021, 19:13 kevin.pfeifer which could cause forced lowercase column names
# Apr 22nd 2021, 19:13 kevin.pfeifer https://book.cakephp.org/4/en/orm/database-basics.html#configuration https://www.php.net/manual/en/pdo.constants.php
# Apr 22nd 2021, 19:13 kevin.pfeifer there is also a `flags` key in the connection config where you can define PDO configs like this ```PDO::CASE_LOWER (int) Force column names to lower case.```
# Apr 22nd 2021, 19:12 admad @mehov `bake` or the cakephp cli in general is meant for the app not plugin. Copying over the files won't work either.
# Apr 22nd 2021, 19:12 ndm If you do `$query->sql()` what do you get?
# Apr 22nd 2021, 19:12 umer936 yes bc it changes if I change the order by or where
# Apr 22nd 2021, 19:11 ndm *are you sure
# Apr 22nd 2021, 19:11 ndm Are you it's from that specific query? Check the stracktrace in your logs from what query exactly this is being triggered.
# Apr 22nd 2021, 19:10 umer936 bc i get (in DebugKit Log), Undefined column: 7 ERROR: column engineerings.sutc does not exist (when i passed in SUTC)
# Apr 22nd 2021, 19:07 umer936 Huh.
# Apr 22nd 2021, 19:02 ndm @umer936 I've tried it with Postgres right now, and it works fine, the generated SQL keeps the case as passed to the query, neither does it remove manual quotes, nor does it change the case. :thinking_face:
# Apr 22nd 2021, 19:01 mehov Thank you for confirming. This is inside your standalone plugin, correct? Did you manually copy your bin folder into your plugin from elsewhere, or was it installed automatically?
# Apr 22nd 2021, 18:58 mehov Hi everyone! I baked a plugin and moved it outside of my CakePHP 4 app, so now it's standalone. Am I supposed to be able to cd into the plugin folder and run `bin/cake bake model etc.`? I made sure plugin's composer installed the bake and the actual cakephp into plugin's vendor folder
# Apr 22nd 2021, 18:51 umer936 Positive. If I run `bin/cake version` , i get 4.2.5
# Apr 22nd 2021, 18:50 ndm Are you sure that you're on 4.2.5 in the environment where you're testing this?
# Apr 22nd 2021, 18:49 umer936 Hmm
# Apr 22nd 2021, 18:49 umer936 Using the ->where() or ->select() methods also strips the quote marks, which is why im specifying them in the array
# Apr 22nd 2021, 18:48 ndm This should have been fixed somewherere in 4.1 IIRC, and a quick test shows that it works.
# Apr 22nd 2021, 18:47 umer936 I'm using CakePHP 4.2.5
# Apr 22nd 2021, 18:46 ndm Well, that's conditions, not fields ;) Yeah, that was fixed in recent CakePHP 4.x. If you can't upgrade yet, you should be able to workaround it by using expressions
# Apr 22nd 2021, 18:46 umer936 i solved the above by making it `['"SUTC" >=' => 300]`
# Apr 22nd 2021, 18:46 umer936 basically anywhere i try to use the column name is an issue
# Apr 22nd 2021, 18:43 umer936 ```$this->ModelName->find('all',```
# Apr 22nd 2021, 18:42 ndm @umer936 Do you have an example to reproduce this? I don't remember CakePHP ever changing the case of fields in the select list.
# Apr 22nd 2021, 18:27 slackebot `'fields'` bc it removes the quote marks. How should I be going about this? I see there's `quoteIdentifier` in `SqlDialectTrait.php` , or is there a better way?
# Apr 22nd 2021, 18:27 umer936 Hello. I'm having trouble with running queries on tables in a Postgres DB. The DB (which I can't change) has the column names in caps. (eg: "COLNAME") So if I do a `find('all', ['fields' => $parameters]);` (with `$parameters` being array of column names), the query that gets run searches for a lowercase colname (which fails). I "fixed" this elsewhere by wrapping `'conditions'` values with " quote marks, but that fails for
# Apr 22nd 2021, 16:46 marek.sebera Yup, but the extended deadline is something i personally very appreciate
# Apr 22nd 2021, 16:21 admad I hope you are still working on upgrading to 4.x :)
# Apr 22nd 2021, 15:52 marek.sebera Y'all who maintain and contribute to the CakePHP project, thank you very much for your efforts, now this goes specifically to whomever decided that both 3.x bug and security support will be extended to 15/Dec/2021 through 3.10.x releases, big ups!
# Apr 22nd 2021, 15:28 slackebot `*JoinWith()` methods are really just the tad more convenient variant of manual joins, and using custom aliases is the compromise that allows you to inject data and avoid the matching data structure.