Log message #3940506

# At Username Text
# Sep 29th 2016, 20:15 slackebot it is not working.
# Sep 29th 2016, 20:15 adityapansari Hey , I am using search plugin https://github.com/FriendsOfCake/search> So , In my events table , I added - $this->searchManager() ->add('created', 'Search.Callback', [ 'callback' => function ($query, $args, $manager) { return $query->andWhere(["Events.start >=" => $args['from_date']]) ->andWhere(["Events.start <=" = $args['to_date']]); }
# Sep 29th 2016, 20:07 associatee You see, there's an associated row that actually satisfies the matching condition, but it's not being loaded
# Sep 29th 2016, 20:07 associatee >contain(['PpcConjuntosEquivalencias' => function($q) use ($projetoId){ return $q->matching('Representante.ProjetoEstruturas', function($sq) use ($projetoId) { return $sq->where(['ProjetoEstruturas.projeto_id' => $projetoId]); });
# Sep 29th 2016, 20:07 associatee but it's not working properly
# Sep 29th 2016, 20:06 associatee but I want to filter by sub associations
# Sep 29th 2016, 20:06 sazpaimon mind you, my cake knowledge is very limited so I could be missing something
# Sep 29th 2016, 20:06 associatee So I pass a query to the contain
# Sep 29th 2016, 20:06 associatee but I want to filter it
# Sep 29th 2016, 20:06 associatee I'm loading an association
# Sep 29th 2016, 20:06 associatee hey guys
# Sep 29th 2016, 20:05 sazpaimon If I use a component, then I can simply mock that component in $this->generate() and not have to mock out any of the controller methods
# Sep 29th 2016, 20:03 sazpaimon how do I load a service class via $components/helpers/uses? That's kind of my goal here
# Sep 29th 2016, 20:01 admad s/i/it
# Sep 29th 2016, 20:00 admad though i can be just a general service class, doesnt have to be a component
# Sep 29th 2016, 20:00 admad a wrapper class sounds good.
# Sep 29th 2016, 20:00 sazpaimon only thing I can think of is make a very thin wrapper using a component, that way I can mock the SDK in $this->generate(...)
# Sep 29th 2016, 19:59 sazpaimon problem is, I don't see an easy way to mock the facebook sdk in my controller unit tests.
# Sep 29th 2016, 19:58 sazpaimon for instance, I want to load the Facebook SDK for a controller. The only plugin for 2.x hasn't been updated in years and uses an unsupported SDK version, so I'll need to load the latest SDK version via composer
# Sep 29th 2016, 19:56 sazpaimon they aren't dev dependencies
# Sep 29th 2016, 19:55 admad *load
# Sep 29th 2016, 19:55 admad sazpaimon: why not just loading the dependencies using "require-dev" ?
# Sep 29th 2016, 19:47 sazpaimon seems like the best way would be to wrap the dependency in a component and mock the component out in the controller test
# Sep 29th 2016, 19:47 sazpaimon in cake 2, is there a way to load composer dependencies in a way that can be mocked when testing a controller?
# Sep 29th 2016, 19:47 prepender with collections its like name => rows
# Sep 29th 2016, 19:42 prepender I want to do like Index => [ name => name, rows => rows ]
# Sep 29th 2016, 19:41 prepender I dont like how the array key is the column title
# Sep 29th 2016, 19:41 prepender but I wish it formatted a little different
# Sep 29th 2016, 19:34 Leonardo_0112 harry1: thanks
# Sep 29th 2016, 19:27 harry1 */30 * * * * cd /mnt/cake2/app/ andand Console/cake my_job
# Sep 29th 2016, 19:26 harry1 Leonardo_0112: yes so in your cron tab you have something like
# Sep 29th 2016, 19:09 Leonardo_0112 harry1: probably yes. Am I in the right way? http://book.cakephp.org/2.0/en/console-and-shells.html
# Sep 29th 2016, 19:08 harry1 http://book.cakephp.org/2.0/en/console-and-shells.html
# Sep 29th 2016, 19:08 harry1 Leonardo_0112: probably a cron job?
# Sep 29th 2016, 18:50 Leonardo_0112 Hi guys! I'm working in a cakephp2 project and i need to automatically generate a .csv file based on database records. The csv file is already been generated by controller/model when I access a URL. What is the best way to make it run automaticaaly every day, for instance.
# Sep 29th 2016, 17:37 admad ;)
# Sep 29th 2016, 17:36 noibilism @admad: i got itâ?¦.thanksâ?¦.some validation rules were violated
# Sep 29th 2016, 17:32 slackebot ~tell noibilism about gist
# Sep 29th 2016, 17:32 slackebot Command sent from Slack by admad:
# Sep 29th 2016, 17:32 admad show the output of `debug($entities) before passing to saveMany()
# Sep 29th 2016, 17:31 noibilism @admad itâ??s not saving the data