Log message #4261720

# At Username Text
# Apr 22nd 2021, 19:31 ndm @umer936 Ohhh, OK. I thought your actual SQL would change, but it's just in the error message? If so, try enabling auto-quoting in your driver config.
# Apr 22nd 2021, 19:28 umer936 https://i.imgur.com/jZ3OQyO.png
# Apr 22nd 2021, 19:27 admad https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository "url" can be a local file system path
# Apr 22nd 2021, 19:27 umer936 Let me get a screenshot one sec
# Apr 22nd 2021, 19:26 kevin.pfeifer mhmm ok
# Apr 22nd 2021, 19:26 umer936 No it didn't change anything here
# Apr 22nd 2021, 19:26 kevin.pfeifer in tools
# Apr 22nd 2021, 19:26 kevin.pfeifer i know there are behaviours which do many things
# Apr 22nd 2021, 19:25 umer936 :+1:trying that now
# Apr 22nd 2021, 19:24 kevin.pfeifer i would try to not load that and check the sql again
# Apr 22nd 2021, 19:24 admad @mehov Seems like you made it standalone prematurely :). Anyway, the easiest way is just symlink it into an app's plugin folder. Another option is composer allows adding a local directory as a repo source, so use that feature to load it thorough app's composer.json.
# Apr 22nd 2021, 19:24 kevin.pfeifer could there be something the tools plugin does?
# Apr 22nd 2021, 19:22 mehov To be clear: I'm not asking for full guidance, but just a general idea
# Apr 22nd 2021, 19:22 ndm @umer936 That's pretty wild, I have to admit I'm kinda lost, internally `$query->sql()` is that would get sent to the DB, and what DebugKit receivees. If you recreate the same query using `$table->getConnection()->newQuery()->...`, do you get the same case chaning behavior.
# 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