# |
Jul 4th 2018, 09:48 |
josbeir |
https://book.cakephp.org/3.0/en/orm/query-builder.html#adding-calculated-fields |
# |
Jul 4th 2018, 09:47 |
josbeir |
btw, if its a simple manipulation you could also use formatResults() |
# |
Jul 4th 2018, 09:46 |
lubos |
yep, more examples in doc would help I think... once I am not so confused, might add some :slightly_smiling_face: |
# |
Jul 4th 2018, 09:45 |
josbeir |
i must admit that the whole mapreduce stuff is very confusing |
# |
Jul 4th 2018, 09:45 |
lubos |
@lorenzo any expert advice? :slightly_smiling_face: |
# |
Jul 4th 2018, 09:45 |
lubos |
yep... mapReduce not so easy for me though :slightly_smiling_face: but thanks for suggestions :slightly_smiling_face: |
# |
Jul 4th 2018, 09:44 |
josbeir |
its probabily possible with mapreduce tho... |
# |
Jul 4th 2018, 09:43 |
lubos |
Got it :slightly_smiling_face: |
# |
Jul 4th 2018, 09:43 |
josbeir |
$table->retrieceCoolResult() for instance |
# |
Jul 4th 2018, 09:43 |
lubos |
OK, yep. right. But mapReduce is postprocessing and I like how I can stack multiple finders :slightly_smiling_face: |
# |
Jul 4th 2018, 09:43 |
josbeir |
doesn't need to be a finder |
# |
Jul 4th 2018, 09:43 |
josbeir |
i know, a finder |
# |
Jul 4th 2018, 09:43 |
lubos |
that's what I am trying too :slightly_smiling_face: |
# |
Jul 4th 2018, 09:43 |
josbeir |
it depends, a method in your table can be a possibility where you do some post processing |
# |
Jul 4th 2018, 09:42 |
josbeir |
nah, keep your controllers light |
# |
Jul 4th 2018, 09:42 |
lubos |
so you would use post-processing, collection methods in the controller? |
# |
Jul 4th 2018, 09:42 |
josbeir |
probably not no |
# |
Jul 4th 2018, 09:40 |
lubos |
@josbeir can we use collection methods in finder as shown here https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#stacking-multiple-operations (findCommonWords example) ? |
# |
Jul 4th 2018, 09:39 |
josbeir |
but it returns a collection right, why not use collection methods then ? |
# |
Jul 4th 2018, 09:38 |
lubos |
@josbeir it is, but it always do something like giving you 2 result sets, i want just 1 result set filtered |
# |
Jul 4th 2018, 09:38 |
slackebot4 |
finder in the model, but not sure how to set up mapReduce to just filter. OR can I use other collection methods in the finder in the model? |
# |
Jul 4th 2018, 09:38 |
lubos |
I am lost, anyone give me hint to following problem: I have `Offers` which are associated to `SuppressedOffers` (same table via joinTable). Let's say we have ``` offer1 suppressed_offers offer3 offer2 offer3 ``` When I result set with `offer1`, I don't want to show `offer3` I think I can't build sql query like this and I have to do post-processing or two queries (searching suppressed ones first) I like mapReduce, to be added in |
# |
Jul 4th 2018, 09:37 |
josbeir |
@lubos is the map/reduce docs in the cake book not helping ? |
# |
Jul 4th 2018, 09:37 |
steinkel |
same as the cake2 certification, and same as before 100% donated to the cake software foundation |
# |
Jul 4th 2018, 09:36 |
neon1024 |
Ah, cool :thumbsup: |
# |
Jul 4th 2018, 09:36 |
steinkel |
it's in QA now so hopefully we can get it out of the oven soon, sorry for the pun |
# |
Jul 4th 2018, 09:36 |
josbeir |
and how much will it cost :) |
# |
Jul 4th 2018, 09:35 |
neon1024 |
@steinkel Do you think you’ll beat the 4.0 release? ;) |
# |
Jul 4th 2018, 09:35 |
steinkel |
some people expressed interest in having a certification though, so we are working on a cake3 certification (tier1 and tier2) based on random questions (test) + open questions |
# |
Jul 4th 2018, 09:30 |
lubos |
You mean other methods in collection, I am aware of them. I just like example how mapReduce can be set in custom finder |
# |
Jul 4th 2018, 09:27 |
neon1024 |
Or look at implementing some code katas http://codekata.com/ |
# |
Jul 4th 2018, 09:27 |
neon1024 |
If you want to learn a specific part of the framework, make up a project which uses that part and build it |
# |
Jul 4th 2018, 09:26 |
josbeir |
experience will. |
# |
Jul 4th 2018, 09:26 |
josbeir |
agreed, a certification will not make you a better cake developer i think |
# |
Jul 4th 2018, 09:26 |
neon1024 |
Which parts of the framework are you interested in learning more about? If you’ve done ‘many of project in cake’ you must be familiar with most of the functionality provided in the core |
# |
Jul 4th 2018, 09:25 |
neon1024 |
@amit.mehra Why do you think that it is vast? |
# |
Jul 4th 2018, 09:22 |
neothermic |
https://github.com/cakephp/cakephp/blob/de7ebdb88e11c4283185ba33c827151f02352b4b/src/Database/Schema/MysqlSchema.php#L122-L124 / https://github.com/cakephp/cakephp/blob/de7ebdb88e11c4283185ba33c827151f02352b4b/src/Database/Schema/MysqlSchema.php#L137-L139 |
# |
Jul 4th 2018, 09:22 |
amit.mehra |
????????????????// |
# |
Jul 4th 2018, 09:22 |
neothermic |
@neon1024 you can also do BINARY(16) for a better storage format |
# |
Jul 4th 2018, 09:21 |
amit.mehra |
I have done many of project in cake , but now am hought cake is so vast so , thats why i thought to be certified and take classes |
# |
Jul 4th 2018, 09:20 |
amit.mehra |
@neon1024 , so there is no to be certified |