# |
May 30th 2016, 17:30 |
graziel |
huhwatnou if its security issue there is special mail for that kind |
# |
May 30th 2016, 17:28 |
huhwatnou |
@hmic, forget my last remark, it does occur in 2.8.4. I will file an issue. |
# |
May 30th 2016, 17:26 |
hmic |
Diego__, sounds good! |
# |
May 30th 2016, 17:26 |
Diego__ |
something like: $this->User->association('Contacts')->saveStrategy('replace'); |
# |
May 30th 2016, 17:25 |
huhwatnou |
@hmic, it does not seem to be fixed, but the issue does not occur in 2.x's current version. probably because of refactoring. |
# |
May 30th 2016, 17:25 |
Diego__ |
hmm, i think i found something: http://api.cakephp.org/3.2/class-Cake.ORM.Association.html show the method strategy() as setter for select strategy option, there is no mention for saveStrategy() but aparently it exist and work |
# |
May 30th 2016, 17:23 |
hmic |
huhwatnou, check if its fixed in 2.x current, if not - open an issue *PLEASE* |
# |
May 30th 2016, 17:23 |
hmic |
it gets only executed once you iterate it... |
# |
May 30th 2016, 17:23 |
huhwatnou |
@hmic, thank you. I will not submit the issue then, to save us all some time. |
# |
May 30th 2016, 17:22 |
hmic |
because your sql query is invalid |
# |
May 30th 2016, 17:22 |
LckyBy517 |
i meant i couldn't figure out why that line would cause it not to serialize |
# |
May 30th 2016, 17:22 |
hmic |
if there is a security flaw, 2.8 is still supported and - if not already - will fix it in the next release |
# |
May 30th 2016, 17:22 |
LckyBy517 |
yeah i know, i serialize it after :P |
# |
May 30th 2016, 17:21 |
hmic |
huhwatnou, you are supposed to upgrade to the latest 2.x release |
# |
May 30th 2016, 17:21 |
hmic |
even though the association does alredy exist, you could add it by the same name. if thats no help, try $table->hasMany(...) or $table->belongsToMan(...) to configure it - might not work, but looks promising |
# |
May 30th 2016, 17:21 |
huhwatnou |
Hi guys, is 2.7.11 still supported? I just bumped on a security issue... |
# |
May 30th 2016, 17:20 |
hmic |
Diego__, did you try using it? |
# |
May 30th 2016, 17:18 |
hmic |
but there is no json genereated from this line anyways |
# |
May 30th 2016, 17:18 |
hmic |
sounds odd |
# |
May 30th 2016, 17:17 |
LckyBy517 |
i just removed the table name and just left name and it worked |
# |
May 30th 2016, 17:17 |
LckyBy517 |
LOL i know that doesn't but if i just ended with all it was fine haha |
# |
May 30th 2016, 17:16 |
hmic |
as i said, if lots of data, you might hit a OOM condition. these usually get reported where they are hit, so all over the place in the callstack |
# |
May 30th 2016, 17:15 |
hmic |
this does not do any json |
# |
May 30th 2016, 17:15 |
LckyBy517 |
$players = $statsPlayersTable->find('all', ['order' => ['Stats_players.name' => 'ASC']]); |
# |
May 30th 2016, 17:15 |
LckyBy517 |
anybody see why this line would cause cake to return a jsonserialize error? |
# |
May 30th 2016, 17:11 |
Diego__ |
cant find how to do the set() in this property, i can change in the table model initialize but this way all the save() ll use this saveStrategy |
# |
May 30th 2016, 17:10 |
Diego__ |
i have found only addAssociations() in the table model |
# |
May 30th 2016, 17:09 |
LckyBy517 |
nvm found it |
# |
May 30th 2016, 17:09 |
LckyBy517 |
ascending sort, ASEC or just ASC? |
# |
May 30th 2016, 17:00 |
hmic |
Diego__, sure. you can setup associations on the fly |
# |
May 30th 2016, 16:51 |
lykosis |
@maiconpinto: no problem |
# |
May 30th 2016, 16:47 |
LckyBy517 |
but look at this freaking contain hahah https://github.com/MoosemanStudios/api.moosecraft.us/blob/master/src/Controller/Api/StatsController.php |
# |
May 30th 2016, 16:47 |
LckyBy517 |
i got it, typos haha one table is called Stats_Omnomnom, i had Omnonnom and didn't notice it XD |
# |
May 30th 2016, 16:45 |
Diego__ |
Hello, has anyone worked with "saveStrategy" option? i wanted to know if its possible to change this association propreity only for one controller action |
# |
May 30th 2016, 16:40 |
hmic |
LckyBy517, whats the problem with your tables exactly? - might be an OOM? |
# |
May 30th 2016, 16:39 |
graziel |
ok ill try to remember @hmic |
# |
May 30th 2016, 16:39 |
hmic |
mind: you need to setup a detector, the "custom" stuff does not work magically :p |
# |
May 30th 2016, 16:38 |
hmic |
with this syntax its 1. faster, 2. you can check against custom stuff too like ->is('xlsx') |
# |
May 30th 2016, 16:38 |
LckyBy517 |
make that 2 XD |
# |
May 30th 2016, 16:37 |
hmic |
shyboy, graziel: Controller->request->is('ajax') pls |
# |
May 30th 2016, 16:37 |
shyboy |
thanks! |