Log message #3940776

# At Username Text
# Sep 30th 2016, 14:10 renan @bato I would think that doing those manipulations at Query level or Repository would be more appropriate
# Sep 30th 2016, 14:07 bato @renan ehm... is a bit complicated :slightly_smiling_face: I'm trying to implement class table inheritance and I need to manipulate the ResultSet to assure to always have populated my entity also selecting fields without specifiyng the TableName...
# Sep 30th 2016, 14:02 ypnos thanks a lot
# Sep 30th 2016, 14:01 dereuromark ah te problems of not being here on slack I guess basically use my tools plugin reset behavior it was designed exactly for those use cases 3 year old blog post about it: http://www.dereuromark.de/2013/10/29/resetbehavior-and-hazardablebehavior/ :slightly_smiling_face: you can pull each record and populate it with the desired one, in a loop over all via shell
# Sep 30th 2016, 14:00 ypnos oh, you need to sign in to see this page...
# Sep 30th 2016, 14:00 ypnos )
# Sep 30th 2016, 14:00 dereuromark ok, maybe it was a week ago HEHE
# Sep 30th 2016, 14:00 renan @bato It doesnâ??t seem there is a way to inject the class you want, no. But if I may ask, what are you trying to do that requires a custom resultset class?
# Sep 30th 2016, 13:59 dereuromark See https://cakesf.slack.com/archives/support/p1474573981010358
# Sep 30th 2016, 13:59 ypnos dereuromark: seems like a good addition to the docs then ;)
# Sep 30th 2016, 13:58 dereuromark ypnos: that was a question 2 days ago :slightly_smiling_face: yes there is
# Sep 30th 2016, 13:55 bato hi all, is there a way to use a custom `ResultSet` class in `Query` (cake3)? The only way I found is override `Table::query()`, to use a custom `Query`object that ovverride `Query::_execute()` that returns my custom `ResultSet`
# Sep 30th 2016, 13:47 ypnos is there an automatic way to initialize all counts?
# Sep 30th 2016, 13:47 ypnos like, I already have comments associated to articles, and now I add the counter cache and the column in the db
# Sep 30th 2016, 13:46 ypnos is there a way to build the counters for existing data?
# Sep 30th 2016, 13:46 ypnos talking about the counter cache
# Sep 30th 2016, 13:44 birdy247 My bedtime reading usually consists of looking at the API docs :grinning:
# Sep 30th 2016, 13:44 birdy247 I wish there were a way to inherit all these little tricks
# Sep 30th 2016, 13:43 birdy247 @admad neat :slightly_smiling_face:
# Sep 30th 2016, 13:11 birdy247 similar to cakebox, I probably use it in its most basic sense, but it works for me
# Sep 30th 2016, 13:11 birdy247 I am using the @dereuromark in prod
# Sep 30th 2016, 12:58 bravo-kernel awesome :slightly_smiling_face:
# Sep 30th 2016, 12:57 admad @bravo-kernel $entity->source() will give you table name as string
# Sep 30th 2016, 12:56 bravo-kernel any way I can derive/get the Table object from an Entity?
# Sep 30th 2016, 12:44 inoas okay
# Sep 30th 2016, 12:44 bravo-kernel google should know
# Sep 30th 2016, 12:43 inoas is it like beantalkd or rabbitmq?
# Sep 30th 2016, 12:43 bravo-kernel @inoas it's actually quite simple once you get gearmand installed on your server
# Sep 30th 2016, 12:42 inoas bravo kernel gearman looks good but also heavy
# Sep 30th 2016, 12:41 admad carrieOn: easiest way would be to use counter cache behavior to maintain count of fruits for each tree then querying is trivial, just select recors where fruit_count = 3
# Sep 30th 2016, 12:22 carrieOn lets say I have the table Trees, and a tree can have many Fruits. How can I retrieve only Trees that have 3 fruits?
# Sep 30th 2016, 12:21 carrieOn Is there anyway to use a query to filter by association count?
# Sep 30th 2016, 12:21 carrieOn hellow
# Sep 30th 2016, 12:07 dereuromark It has never been a serious tool, more to explain the concepts, but running with simple worker (shorter periods) does the job well so far afaik. If we can get it to properly transaction safe pull jobs, it is of course also a good thing.
# Sep 30th 2016, 12:02 bravo-kernel nobody using https://github.com/cvo-technologies/cakephp-gearman? I find it quite impressive and... for important sites ;)
# Sep 30th 2016, 11:50 spriz 25 min lifetime, and initiate a new one every 5 - sorry :slightly_smiling_face:
# Sep 30th 2016, 11:49 spriz 4/5
# Sep 30th 2016, 11:48 spriz weâ??ve been running with a 20 minute timeout, and start a new worker every 5 minutes., so 4 parallel workers.
# Sep 30th 2016, 11:48 dereuromark Or with one worker
# Sep 30th 2016, 11:48 dereuromark Yeah but only for non important sites
# Sep 30th 2016, 11:48 spriz in terms of timeout, and how often you start a new one