# |
Aug 20th 2019, 12:34 |
martin |
also fixed in cake 4? :P |
# |
Aug 20th 2019, 12:34 |
martin |
When I save an UTC time object to a Europe/Amsterdam database, it saves the utc time instead of adding 2 hours :( |
# |
Aug 20th 2019, 12:25 |
ndm |
@khalid Yes, queries (instances of `\Cake\Database\Query` or `\Cake\ORM\Query`) are query builder objects. You can create the former via connection objects (`Connection::newQuery()`), and the latter via table objects `Table::query()`. |
# |
Aug 20th 2019, 12:24 |
spriz |
@eax that sounds funky. Is it downright an event listener that listens to events fired in another PHP process? |
# |
Aug 20th 2019, 12:22 |
khalid |
I am sorry I just kind of new to cake still.. |
# |
Aug 20th 2019, 12:22 |
khalid |
@ndm thanks, Query::insert() is Querybuilder right? |
# |
Aug 20th 2019, 12:20 |
ndm |
@khalid `Table::saveMany()` is the slowest of them all (there are no `callbacks` and `validate` options btw, that's 2.x options), `Query::insert()` is faster, and then there's one additional way, that is to write plain SQL (make sure that you're using prepared statements if you chose that way!), which would be the fastest way on CakePHP level. |
# |
Aug 20th 2019, 12:04 |
khalid |
I am already using savemany with array('callbacks' => false, 'validate' => false) |
# |
Aug 20th 2019, 12:03 |
khalid |
there is no faster way |
# |
Aug 20th 2019, 12:03 |
khalid |
@ndm thanks for your reply, so if I want to insert like 1million records, then I have no option except save or save many? or I go through QueryBuilder and write insert queries right? |
# |
Aug 20th 2019, 11:12 |
ndm |
There is none, the 3.x connection manager stores the instantiated connection objects in a registry object that lives in a protected property for which there is no public accessor available. |
# |
Aug 20th 2019, 11:05 |
val |
We have `ConnectionManager::sourceList()` in 2.x. What's its alternative in 3.x? |
# |
Aug 20th 2019, 10:58 |
ndm |
No, it's not, there's not even a `DboSource` class in 3.x, that's 2.x stuff. In 3.x you can use the query builder to create insert statements without using the ORM. |
# |
Aug 20th 2019, 10:49 |
khalid |
is insertMulti part of cake3.x? |
# |
Aug 20th 2019, 10:46 |
khalid |
Thank you for the help. |
# |
Aug 20th 2019, 10:46 |
khalid |
I am struggling with initialisation of DBO source. |
# |
Aug 20th 2019, 10:45 |
khalid |
hi everyone, how to use DboSource insert multi in a model? |
# |
Aug 20th 2019, 10:41 |
slackebot |
Thanks |
# |
Aug 20th 2019, 10:41 |
haresh |
Hello Guys I have used Cakephp 3.6 I have one security concern for below point, Please let us know your thought on this. The value of the URL path filename is copied into the response within the query string of a URL. The payload ?jukandgcs=1 was submitted in the URL path filename. This input was echoed as ?jukandgcs=1 within the "action" attribute of a "form" tag. So is it any security risk while submitting this form? You can see screenshot |
# |
Aug 20th 2019, 10:36 |
slackebot |
Thanks |
# |
Aug 20th 2019, 10:36 |
haresh |
Hello Guys I have used Cakephp 3.6 I have one security concern for below point, Please let us know your thought on this. The value of the URL path filename is copied into the response within the query string of a URL. The payload ?jukandgcs=1 was submitted in the URL path filename. This input was echoed as ?jukandgcs=1 within the "action" attribute of a "form" tag. So is it any security risk while submitting this form? You can see screenshot |
# |
Aug 20th 2019, 10:32 |
jiri.sejhar |
cake 3.7 version |
# |
Aug 20th 2019, 10:28 |
dereuromark |
you should always mention the cake version |
# |
Aug 20th 2019, 10:25 |
jiri.sejhar |
guys nobody answerd me is necesery do this array_merge($this->request->getData(), ['id'=>$item->id]) if i would get form data with id after insert save ? |
# |
Aug 20th 2019, 09:41 |
eax |
Hey folks! Cake3 question: I am setting up some Integration Tests, and I need to test a system that has a Shell/Command running in the background as a listener. Is there a way to start that Listener, and then run the rest of my tests? Thanks! |
# |
Aug 20th 2019, 09:37 |
dereuromark |
https://github.com/burzum/cakephp-service-layer |
# |
Aug 20th 2019, 09:37 |
dereuromark |
service layer :slightly_smiling_face: |
# |
Aug 20th 2019, 09:27 |
turkles |
I want to access some user data across controllers and some custom classes, possibly some Commands - where best to put it? |
# |
Aug 20th 2019, 09:26 |
neon1024 |
Or does compact take a variable name, I forget |
# |
Aug 20th 2019, 09:26 |
bernardine.ragas |
awww yeah, ill try |
# |
Aug 20th 2019, 09:25 |
neon1024 |
So you’ll have `compact($subject)` somewhere in the code |
# |
Aug 20th 2019, 09:25 |
neon1024 |
Undefined variable is self explanatory |
# |
Aug 20th 2019, 09:25 |
neon1024 |
Well compact is a php method used in cake to set variables to the view |
# |
Aug 20th 2019, 09:24 |
bernardine.ragas |
how do i fix this :slightly_smiling_face: please help |
# |
Aug 20th 2019, 09:24 |
neon1024 |
Audit stash! I might need that one later too. Good reminder |
# |
Aug 20th 2019, 09:24 |
bernardine.ragas |
Hi guys i have this problem, Undefined variable: subject [CORE/Cake/Utility/ObjectCollection.php, line 128 |
# |
Aug 20th 2019, 09:17 |
koeller |
I’m using muffin/footprint. I will have a further look into that. (y) |
# |
Aug 20th 2019, 09:17 |
admad |
Also checkout Lorenzo/audit-stash plugin |
# |
Aug 20th 2019, 09:16 |
admad |
There's muffin/footprint plugin for that |
# |
Aug 20th 2019, 09:14 |
koeller |
@admad: The idea with a behavior sounds good. Thanks. But my problem right now is to get the authed user. |
# |
Aug 20th 2019, 09:13 |
admad |
@koeller sounds good, though if you need to do so for multiple tables use a behavior |