# |
Jan 23rd 2020, 16:32 |
neothermic |
https://dev.mysql.com/doc/refman/8.0/en/keywords.html#keywords-new-in-current-series |
# |
Jan 23rd 2020, 16:32 |
neothermic |
wow, they added a bunch in 8 |
# |
Jan 23rd 2020, 16:30 |
jotpe |
grrrr |
# |
Jan 23rd 2020, 16:29 |
neothermic |
`RANK (R); added in 8.0.2 (reserved)` |
# |
Jan 23rd 2020, 16:29 |
neon1024 |
@jotpe Oh, nice find :clap: |
# |
Jan 23rd 2020, 16:29 |
jotpe |
wtf. Took me ages to solve this: since MySQL 8 `rank()` is a keyword. For that reason, my local dev env does not work @neon1024 |
# |
Jan 23rd 2020, 16:28 |
neothermic |
aha, but I can pass label as an array, and that'll do it |
# |
Jan 23rd 2020, 16:23 |
neothermic |
ah, boo, the bootstrap-ui doesn't support labelOptions :| |
# |
Jan 23rd 2020, 16:01 |
slackebot |
though what the right way would be... |
# |
Jan 23rd 2020, 16:01 |
ndm |
As you can see in the stacktrace, it happens when retrieving the target models for associations. So maybe your CMS models do not have associations, or the table classes already exists and have the CMS connection set as default. And/or the table classes for the associations for your pdfPlatform connection already exist and don't have their default connection changed. That's probably something that would need to be fixed in bake anyhow, not sure |
# |
Jan 23rd 2020, 15:54 |
k4t |
if I rename "PdfPlatform" source to "default" it will work of course |
# |
Jan 23rd 2020, 15:51 |
k4t |
I can bake models from "CMS" source, but not from "pdfPlatform" |
# |
Jan 23rd 2020, 15:51 |
k4t |
I have two datasources defined, one is "pdfPlatform" and second one is "CMS" |
# |
Jan 23rd 2020, 15:49 |
k4t |
looks like --connection parameter is ignored somewhere by bake plugin |
# |
Jan 23rd 2020, 15:48 |
k4t |
here you can see full log |
# |
Jan 23rd 2020, 15:47 |
slackebot |
<k4t> |
# |
Jan 23rd 2020, 15:44 |
ndm |
Look at the stacktrace to see where and for what operation exactly the exception is being thrown |
# |
Jan 23rd 2020, 15:41 |
k4t |
as you can see |
# |
Jan 23rd 2020, 15:41 |
k4t |
but result is the same |
# |
Jan 23rd 2020, 15:41 |
k4t |
bin\cake bake model PPlaces --connection pdfPlatform One moment while associations are detected. Exception: The datasource configuration "default" was not found. |
# |
Jan 23rd 2020, 15:41 |
k4t |
I also tried |
# |
Jan 23rd 2020, 15:38 |
k4t |
but it works when you just want to list all tables from db |
# |
Jan 23rd 2020, 15:38 |
k4t |
it looks like passing connection name when you want to bake a model does not work |
# |
Jan 23rd 2020, 15:36 |
k4t |
CakePHP 3.8 |
# |
Jan 23rd 2020, 15:36 |
k4t |
any ideas? |
# |
Jan 23rd 2020, 15:36 |
k4t |
bin\cake bake model PPlaces -c pdfPlatform -> will give me error Exception: The datasource configuration "default" was not found. |
# |
Jan 23rd 2020, 15:35 |
k4t |
bin\cake bake model -c pdfPlatform -> will give me list of all models in database |
# |
Jan 23rd 2020, 15:34 |
k4t |
Hi |
# |
Jan 23rd 2020, 15:34 |
val |
@ndm, ah, foreign key must be selected :) |
# |
Jan 23rd 2020, 15:30 |
spriz |
like /foo/bar/baz/action would be hitting the controller in this path `/plugins/Foo/src/Controller/Bar/Baz/ActionController`? |
# |
Jan 23rd 2020, 15:30 |
val |
@ndm any idea why 'select' strategy would not generate a query? |
# |
Jan 23rd 2020, 15:29 |
spriz |
is there a sneaky way to make more nested levels of prefix controllers available in cake 3.x ? :P |
# |
Jan 23rd 2020, 15:13 |
ndm |
https://book.cakephp.org/4/en/orm/retrieving-data-and-resultsets.html#changing-fetching-strategies |
# |
Jan 23rd 2020, 15:13 |
ndm |
Should work via the `strategy` option for the containment I think |
# |
Jan 23rd 2020, 15:11 |
val |
@ndm is there a way to change the association strategy 'join' to 'select' on the fly? |
# |
Jan 23rd 2020, 15:09 |
val |
@ndm it looks like the mapper closure is not invoked |
# |
Jan 23rd 2020, 15:02 |
val |
@ndm indeed, beforeFind is invoked but the mapper does not work as expected |
# |
Jan 23rd 2020, 15:00 |
ndm |
That's only for delete operations if I'm not mistaken |
# |
Jan 23rd 2020, 14:59 |
neon1024 |
If it’s a bulk operation and it’s not set true, the callback would be skipped right |
# |
Jan 23rd 2020, 14:58 |
neon1024 |
@ndm Could it be to do with cascadeCallbacks in the association? |
# |
Jan 23rd 2020, 14:58 |
ndm |
@val Have you checked that the method really isn't being invoked (as opposed to the mapper maybe not working as expected)? |