# |
Jul 11th 2018, 08:21 |
josbeir |
cake 2, cake 3? |
# |
Jul 11th 2018, 08:21 |
josbeir |
what is your issue |
# |
Jul 11th 2018, 08:19 |
prasanna.venkat |
hi can anyone help with the routing issue mentioned above |
# |
Jul 11th 2018, 08:17 |
lorenzo |
lol |
# |
Jul 11th 2018, 08:16 |
neon1024 |
Glad it’s not just me that happens to! ;) |
# |
Jul 11th 2018, 08:16 |
lorenzo |
and it was me who implemented it :) |
# |
Jul 11th 2018, 08:16 |
lorenzo |
sounds like that is true |
# |
Jul 11th 2018, 08:14 |
josbeir |
https://book.cakephp.org/3.0/en/core-libraries/collections.html#Cake\Collection\Collection::firstMatch |
# |
Jul 11th 2018, 08:14 |
lorenzo |
ok, then I don’t remember correctly |
# |
Jul 11th 2018, 08:14 |
lorenzo |
oh? |
# |
Jul 11th 2018, 08:14 |
josbeir |
it is documented @lorenzo |
# |
Jul 11th 2018, 08:13 |
lorenzo |
@neon1024 it does not support dot noation for matching |
# |
Jul 11th 2018, 08:13 |
neon1024 |
As my `findCompany()` is returning null, which isn’t ideal |
# |
Jul 11th 2018, 08:13 |
neon1024 |
However I’ve also found a bug earlier in my code path, so I need to fix that first |
# |
Jul 11th 2018, 08:12 |
neon1024 |
File uploaded https://cakesf.slack.com/files/U1BT622HW/FBNFFL36E/-.sql / https://slack-files.com/T053DPNCM-FBNFFL36E-34ad6d506a |
# |
Jul 11th 2018, 08:12 |
josbeir |
probably better write a filter function |
# |
Jul 11th 2018, 08:12 |
josbeir |
but doubting it |
# |
Jul 11th 2018, 08:12 |
neon1024 |
So I would get an entity back, on the first match of either websites.id 5 or 6 |
# |
Jul 11th 2018, 08:12 |
josbeir |
? |
# |
Jul 11th 2018, 08:12 |
josbeir |
not sure how it works, if it uses hash::extract maybe you could use websites.{n}.id |
# |
Jul 11th 2018, 08:11 |
neon1024 |
`$collection->firstMatch(['websites.id' => [5,6]])` |
# |
Jul 11th 2018, 08:11 |
josbeir |
bye |
# |
Jul 11th 2018, 08:11 |
saeideng |
OK , I should go now , by |
# |
Jul 11th 2018, 08:11 |
neon1024 |
@saeideng No. |
# |
Jul 11th 2018, 08:10 |
saeideng |
``` firstMatch([ 'user.name' => 'Mark', 'active' => true ]); ``` |
# |
Jul 11th 2018, 08:10 |
neon1024 |
I want to find an id in a nested entity, which hasMany arrays of entities as associations. |
# |
Jul 11th 2018, 08:10 |
saeideng |
yes |
# |
Jul 11th 2018, 08:10 |
saeideng |
yet it supports |
# |
Jul 11th 2018, 08:10 |
josbeir |
@neon1024 you mean [ 'foo' => [ 'bar, 'bar' ] ] ? |
# |
Jul 11th 2018, 08:09 |
saeideng |
yes `leech` :slightly_smiling_face: |
# |
Jul 11th 2018, 08:05 |
lorenzo |
what are you trying to do? |
# |
Jul 11th 2018, 07:59 |
neon1024 |
Does `firstMatch()` support arrays? I can’t seem to get that to work, https://book.cakephp.org/3.0/en/core-libraries/collections.html#Cake\Collection\Collection::firstMatch |
# |
Jul 11th 2018, 07:46 |
neon1024 |
It would be ‘leech’ like the creature in this context :slightly_smiling_face: |
# |
Jul 11th 2018, 07:41 |
saeideng |
aha you need to leach a file |
# |
Jul 11th 2018, 07:41 |
neon1024 |
If it’s local, just use `rename()` |
# |
Jul 11th 2018, 07:40 |
neon1024 |
Download a file would make me think it’s remote |
# |
Jul 11th 2018, 07:40 |
saeideng |
there is a method in request object for downloading file |
# |
Jul 11th 2018, 07:39 |
saeideng |
why save to tmpfile? |
# |
Jul 11th 2018, 07:37 |
magiq |
How to download file by url with the help of Cake\Filesystem\File and save it to tmpfile ? |
# |
Jul 11th 2018, 07:25 |
romanovich095 |
Morning @neon1024 |
# |
Jul 11th 2018, 07:24 |
neon1024 |
Morning all |