# |
Jul 3rd 2019, 19:11 |
cnizzardini |
might be something goofy occuring upstream |
# |
Jul 3rd 2019, 19:10 |
cnizzardini |
*made |
# |
Jul 3rd 2019, 19:10 |
cnizzardini |
it mad a difference for me |
# |
Jul 3rd 2019, 19:08 |
ndm |
@cnizzardini Setting `$double` to `false` shouldn't make a difference, that option won't affect the behavior for single quotes. Maybe you actually _are_ double encoding at some point, ie passing the `h()`'d value to `h()` again. |
# |
Jul 3rd 2019, 19:00 |
cnizzardini |
My suggestion would be the strangler approach https://martinfowler.com/bliki/StranglerFigApplication.html |
# |
Jul 3rd 2019, 18:59 |
cnizzardini |
not much BC there |
# |
Jul 3rd 2019, 18:59 |
cnizzardini |
but I believe upgrading from 2 to 3 is a massive efforts |
# |
Jul 3rd 2019, 18:58 |
cnizzardini |
I wish a cake dev was in here |
# |
Jul 3rd 2019, 18:58 |
cnizzardini |
yeah, laravel snobs do no favors for their framework of choice |
# |
Jul 3rd 2019, 18:58 |
brian493 |
I upgraded it to 2 like a year and a half ago in some sort of fugue state |
# |
Jul 3rd 2019, 18:58 |
brian493 |
I wonder if it would be feasible to upgrade this app to 3 |
# |
Jul 3rd 2019, 18:58 |
cnizzardini |
cake 3 is prob a little closer to what you are familiar with in terms of laravel |
# |
Jul 3rd 2019, 18:57 |
brian493 |
you have been super helpful |
# |
Jul 3rd 2019, 18:57 |
cnizzardini |
yeah cake 2 is.... |
# |
Jul 3rd 2019, 18:57 |
brian493 |
the guys in laravel chat are rude AND they have no idea what they are talking about |
# |
Jul 3rd 2019, 18:57 |
brian493 |
awesome thanks for your help. I'm a laravel dev and I spend all day in that framework |
# |
Jul 3rd 2019, 18:57 |
cnizzardini |
:+1: |
# |
Jul 3rd 2019, 18:57 |
brian493 |
cool, it dumped 540 rows into my table, this is working |
# |
Jul 3rd 2019, 18:56 |
cnizzardini |
i didn't psuedo code too well there |
# |
Jul 3rd 2019, 18:56 |
brian493 |
syntax is a little weird heh |
# |
Jul 3rd 2019, 18:56 |
cnizzardini |
thats what i meant |
# |
Jul 3rd 2019, 18:56 |
cnizzardini |
yeah |
# |
Jul 3rd 2019, 18:56 |
slackebot |
'quantity' => $quantityItem['quantity'] ] ]); } ``` |
# |
Jul 3rd 2019, 18:56 |
brian493 |
``` $this->StoreQuantity->create(); $this->StoreQuantity->save([ 'StoreQuantity' => [ 'store_id' => $quantityItem['id'], 'store_name' => $quantityItem['name'], |
# |
Jul 3rd 2019, 18:56 |
brian493 |
ah ! I got it |
# |
Jul 3rd 2019, 18:56 |
cnizzardini |
try reversing them? |
# |
Jul 3rd 2019, 18:55 |
brian493 |
that's what I tried before I came in here looking for help :slightly_smiling_face: |
# |
Jul 3rd 2019, 18:55 |
cnizzardini |
$storeQuantity->save($yourArrayOfData); |
# |
Jul 3rd 2019, 18:55 |
cnizzardini |
$this->StoreQuantity->create() |
# |
Jul 3rd 2019, 18:55 |
cnizzardini |
try |
# |
Jul 3rd 2019, 18:54 |
brian493 |
this is my function, I'm calling it as a console command for a scheduled task I'm setting up |
# |
Jul 3rd 2019, 18:54 |
slackebot |
'quantity' => $quantityItem['quantity'] ] ]); $storeQuantity->save(); } } } } ``` |
# |
Jul 3rd 2019, 18:54 |
slackebot |
if ($quantityItems) { foreach ($quantityItems as $quantityItem) { $this->StoreQuantity->create([ 'StoreQuantity' => [ 'store_id' => $quantityItem['id'], 'store_name' => $quantityItem['name'], |
# |
Jul 3rd 2019, 18:54 |
brian493 |
``` public function updateStoreQuantityCache() { $this->Artwork = ClassRegistry::init('Artwork'); $this->StoreQuantity = ClassRegistry::init('StoreQuantity'); $artworks = $this->Artwork->find('all', ['recursive' => 0]); foreach ($artworks as $artwork) { $quantityItems = $this->getStoreQuantities($artwork['Artwork']['id']); |
# |
Jul 3rd 2019, 18:54 |
cnizzardini |
a snippet that is |
# |
Jul 3rd 2019, 18:54 |
cnizzardini |
paste your code |
# |
Jul 3rd 2019, 18:53 |
brian493 |
I am passing my data to the save() call |
# |
Jul 3rd 2019, 18:53 |
brian493 |
oh I think I see what I'm doing wrong |
# |
Jul 3rd 2019, 18:53 |
cnizzardini |
read those, see if it helps |
# |
Jul 3rd 2019, 18:52 |
cnizzardini |
https://api.cakephp.org/2.7/class-Model.html#_save |
# |
Jul 3rd 2019, 18:52 |
cnizzardini |
https://api.cakephp.org/2.7/class-Model.html#_create |