# |
Sep 30th 2016, 14:26 |
Neon1024 |
Oh, on the association? |
# |
Sep 30th 2016, 14:26 |
Neon1024 |
Yes, it should, well, it will |
# |
Sep 30th 2016, 14:25 |
birdy247 |
should the beforeDelete on the association table be called? |
# |
Sep 30th 2016, 14:25 |
Neon1024 |
http://d22zlbw5ff7yk5.cloudfront.net/images/cm-12395-15020da44de9ff.gif |
# |
Sep 30th 2016, 14:25 |
birdy247 |
If I have a hasMany relation, with dependent = true and 'cascadeCallbacks' => true |
# |
Sep 30th 2016, 14:24 |
Neon1024 |
Itâ??s a minefield! |
# |
Sep 30th 2016, 14:24 |
Neon1024 |
My piece of advice for today is donâ??t ever do ajax pagination, sorting and filtering all in the same page |
# |
Sep 30th 2016, 14:24 |
birdy247 |
you? |
# |
Sep 30th 2016, 14:24 |
birdy247 |
busyyy beee |
# |
Sep 30th 2016, 14:24 |
birdy247 |
not bad |
# |
Sep 30th 2016, 14:24 |
Neon1024 |
How do? |
# |
Sep 30th 2016, 14:24 |
Neon1024 |
Ahoy birdy |
# |
Sep 30th 2016, 14:24 |
birdy247 |
Hey Neon1024 |
# |
Sep 30th 2016, 14:20 |
Neon1024 |
Afternoon all! |
# |
Sep 30th 2016, 14:19 |
slackebot |
missing the middle table in `ResultSet::_map` |
# |
Sep 30th 2016, 14:19 |
bato |
@renan in fact, I use `Query::traverse()` and `Query::traverseExpression()` that transfom `field` in the appropriate `TableName.field` but supposing to have table felines extension of mammals extension of animals and feline entity that must have as attirbutes all fields of the three tables. Doing: `TableRegistry::get('Felines')->select(['name'])` (where name is in animals table) build the right query but the resulted entity don't contain the fie |
# |
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 |