# |
Jul 4th 2017, 21:01 |
igreat |
Good day all Would like to if there a way I can validate buildRules without saving the data or outside the save method |
# |
Jul 4th 2017, 20:34 |
cleptric |
Seems to be a good idea too :slightly_smiling_face: |
# |
Jul 4th 2017, 20:33 |
jeremyharris |
@cleptric the error page might be able to read the route and check the route class to find common mistakes between underscore/dashed |
# |
Jul 4th 2017, 20:32 |
jeremyharris |
check your routes file to see the fallback class |
# |
Jul 4th 2017, 20:32 |
jeremyharris |
oh that’s a routing thing. Perhaps you want /longerm-properties/view/x |
# |
Jul 4th 2017, 20:32 |
jarard01 |
i was using longterm_properties/view/x |
# |
Jul 4th 2017, 20:31 |
jarard01 |
my link needed to be longtermProperties/view/x |
# |
Jul 4th 2017, 20:30 |
jeremyharris |
I think it does already. jarard01 was the problem the error message or your file was not camel case? |
# |
Jul 4th 2017, 20:29 |
cleptric |
Hmm, should we add a camelized version to the error Message, compare them and maybe point out that this could be the problem? |
# |
Jul 4th 2017, 20:26 |
jeremyharris |
:camel: |
# |
Jul 4th 2017, 20:26 |
jarard01 |
ahh camel case! |
# |
Jul 4th 2017, 20:23 |
jarard01 |
I can quite clearly see the file |
# |
Jul 4th 2017, 20:23 |
jarard01 |
something very odd going on: "Create the class LongtermPropertiesController below in file: src\Controller\LongtermPropertiesController.php" |
# |
Jul 4th 2017, 20:23 |
jeremyharris |
ack! please don’t drive and text! |
# |
Jul 4th 2017, 20:22 |
jigzat |
hi, hold on I'm driving |
# |
Jul 4th 2017, 20:20 |
jeremyharris |
usually :) |
# |
Jul 4th 2017, 20:19 |
cleptric |
:see_no_evil: |
# |
Jul 4th 2017, 20:18 |
jigzat |
Hello, is there anyone here? |
# |
Jul 4th 2017, 20:17 |
jeremyharris |
I think that would be set in the datasource config under flags |
# |
Jul 4th 2017, 20:16 |
Laureano |
I'm looking into that right now |
# |
Jul 4th 2017, 20:16 |
Laureano |
Seems like CakePHP or MySQL is using an stricter mode, which is setting NO_ZERO_DATE for the session |
# |
Jul 4th 2017, 20:15 |
Laureano |
But, looking at the exception to give you more context, I think I found the issue |
# |
Jul 4th 2017, 20:15 |
Laureano |
Sadly, I can't ask the DBA because other components use that same table, and rely on the fact that it allows zero dates to compared ranges |
# |
Jul 4th 2017, 20:10 |
jeremyharris |
thought: have you tried using ->update instead of updateAll? like $this->query()->update()->set()->where()->execute() |
# |
Jul 4th 2017, 20:09 |
jeremyharris |
also I’d submit a ticket to your DBA to allow nulls in there if you can :slightly_smiling_face: |
# |
Jul 4th 2017, 20:09 |
jeremyharris |
interesting. what exception do you get? can you gist a stack trace? |
# |
Jul 4th 2017, 20:07 |
Laureano |
Thank you jeremyharris! I'm actually able to update the rows outside CakePHP, the engine is ok with that |
# |
Jul 4th 2017, 20:05 |
jeremyharris |
I’m not familiar with MariaDB, you’ll have to look up the docs on your version to see if a 0-date is even allowed. If you’re receiving an error it’s like that it’s not allowed by the db engine |
# |
Jul 4th 2017, 19:57 |
Laureano |
jeremyharris MySQL is MariaDB 10 |
# |
Jul 4th 2017, 19:57 |
Laureano |
admad Would love to -- but it's outside my permissions. Don't have access to do it. I'm just patching an external tool. |
# |
Jul 4th 2017, 19:55 |
admad |
mysql is silly for allowing it |
# |
Jul 4th 2017, 19:55 |
admad |
storing '0000-00-00 00:00:00' is just wrong, set the field to null instead |
# |
Jul 4th 2017, 19:54 |
jeremyharris |
depends on what version of mysql, if I remember right 0-dates like that don’t store in 5.7, you want a proper null field |
# |
Jul 4th 2017, 19:52 |
Laureano |
I would like to bulk reset a field but every approach I tried raised an exception |
# |
Jul 4th 2017, 19:52 |
Laureano |
What would be the correct way to store '0000-00-00 00:00:00' on a datetime field (MySQL) while using $model->updateAll() on CakePHP 3? |
# |
Jul 4th 2017, 18:02 |
awi |
So i haven't moved a single file yet. |
# |
Jul 4th 2017, 18:00 |
awi |
I think so... I am currently making my exif stuff |
# |
Jul 4th 2017, 17:59 |
WyriHaximus |
awi: did you manage to get it working |
# |
Jul 4th 2017, 17:16 |
vix |
Unable to use pagination with Raw Query $results = $connection->execute('SELECT * FROM articles')->fetchAll('assoc'); |
# |
Jul 4th 2017, 16:54 |
jarard01 |
thanks neon1024 |
# |
Jul 4th 2017, 16:53 |
neon1024 |
@jarard01 You need to use the table class when calling table classes from the controller, so it should be `$this->Properties->rhs()` |