# |
Apr 30th 2019, 11:34 |
conehead |
but thanks! |
# |
Apr 30th 2019, 11:33 |
conehead |
@neon1024 well, using $entity->set seems to work as well. At least seems to be a better solution than setting it directly. Don't wanna convert objects to array data first so it gets converted back afterwards |
# |
Apr 30th 2019, 10:45 |
neon1024 |
Patch entity will work with array data though, but it must be organised correctly |
# |
Apr 30th 2019, 10:44 |
neon1024 |
Unless you’re going to save it |
# |
Apr 30th 2019, 10:44 |
neon1024 |
Although worth noting in the above instance, you might want to set an array of Tag entities |
# |
Apr 30th 2019, 10:44 |
neon1024 |
If you’re setting properties specifically perhaps you’re looking for `$entity->set('tags', $arrayOfTags)` |
# |
Apr 30th 2019, 10:43 |
neon1024 |
@conehead Er, well patchEntity is designed to patch request data into an entity, but it should set properties for anything which matches |
# |
Apr 30th 2019, 10:27 |
conehead |
Or is patchEntity only made for marshalling? |
# |
Apr 30th 2019, 10:24 |
conehead |
Hm...can't I `patchEntity` an object with other objects. e.g. `$this->patchEntity($object, ['tags' => $arrayOfTagObjects])` will not add the desired tags `object->tags = $arrayOfTagObjects` whereas works as desired |
# |
Apr 30th 2019, 10:20 |
charolastra |
cool, solved it :) |
# |
Apr 30th 2019, 10:18 |
neon1024 |
This is the specific line it’s complaining about https://github.com/cakephp/app/blob/master/src/Application.php#L79 |
# |
Apr 30th 2019, 10:18 |
neon1024 |
https://github.com/cakephp/app/blob/master/src/Application.php#L61 |
# |
Apr 30th 2019, 10:18 |
neon1024 |
Should be in the Application.php |
# |
Apr 30th 2019, 10:15 |
charolastra |
hi, working on upgrading an app from 3.4 to 3.7 but get warnings with "RoutingMiddleware should be passed an application instance." where is the RoutingMiddleware instantised? |
# |
Apr 30th 2019, 09:47 |
neon1024 |
Morning all :wave: |
# |
Apr 30th 2019, 08:58 |
nils |
I'm looking to use Gearman more effectively. Right now I can't use any of the native cakephp functions. Or at least, I don't know how. Anyone with experience from this? |
# |
Apr 30th 2019, 07:07 |
nils |
Oh, I thought that was just a plugin to use Gearman more effectively. My bad. :slightly_smiling_face: |
# |
Apr 30th 2019, 07:06 |
conehead |
But it says ```Overall functionality is inspired by systems like Gearman, Beanstalk or dropr, but without any illusion to compete with these more advanced Systems.``` |
# |
Apr 30th 2019, 07:06 |
conehead |
Well you were asking for a more modern way ;) |
# |
Apr 30th 2019, 07:05 |
nils |
@conehead I haven't used a plugin, simply using it "natively" - it works quite alright. |
# |
Apr 30th 2019, 07:04 |
conehead |
@nils Not really sure, but shouldnt marks queue plugin what you are looking for? https://github.com/dereuromark/cakephp-queue/tree/2.x |
# |
Apr 30th 2019, 07:02 |
nils |
Haha, as usual, everyone's asleep when I'm awake. :slightly_smiling_face: |
# |
Apr 30th 2019, 06:41 |
nils |
I'm on 2.x |
# |
Apr 30th 2019, 06:39 |
nils |
Do cakephp-people use Gearman for background jobs? Or did you find a more modern way? :slightly_smiling_face: |
# |
Apr 30th 2019, 06:00 |
admad |
it doesn't |
# |
Apr 30th 2019, 05:58 |
hippo |
I know laravel doe sbut I'm pretty sure cake doesn't out of the box |
# |
Apr 30th 2019, 05:58 |
hippo |
does cake cache Config::read() or .env values? |
# |
Apr 30th 2019, 05:51 |
ra7bi |
Thanks a lot @admad |
# |
Apr 30th 2019, 05:40 |
admad |
`['OR' => [[xxx => 1, ffff => 2], [ddd => 1, cccc = 1]]]` |
# |
Apr 30th 2019, 05:39 |
ra7bi |
i want either ` xxxx=1 and ffff=2` or ` dddd=1 and ccccc=1` |
# |
Apr 30th 2019, 05:38 |
ra7bi |
two days working on this query and not able to understand how to get it works |
# |
Apr 30th 2019, 05:38 |
ra7bi |
i want to say is ` select * from users where id=12 and ( (xxxx=1 and ffff = 2) or (dddd=1 and ccccc=1) ); ` |
# |
Apr 30th 2019, 05:37 |
voycey |
Are there any clean patterns to writing these queries with aggregates> |
# |
Apr 30th 2019, 05:36 |
ra7bi |
How i can use contain in `exists()` |
# |
Apr 30th 2019, 05:36 |
voycey |
ok well good to know we arent rewriting everything for nought :slightly_smiling_face: |
# |
Apr 30th 2019, 05:35 |
voycey |
right |
# |
Apr 30th 2019, 05:35 |
admad |
it relates to autoselecting fK fields for associations |
# |
Apr 30th 2019, 05:35 |
voycey |
(as that is all it is whinging about I think) |
# |
Apr 30th 2019, 05:35 |
admad |
nothign to do with your problem |
# |
Apr 30th 2019, 05:35 |
voycey |
Would this just add the appropriate selects in this case? |
# |
Apr 30th 2019, 05:35 |
voycey |
what is enableAutoFields()? |