# |
Sep 30th 2016, 14:32 |
birdy247 |
So a placement hasMany timetables |
# |
Sep 30th 2016, 14:32 |
birdy247 |
ok |
# |
Sep 30th 2016, 14:32 |
Neon1024 |
Whatâ??s the use-case anyway? |
# |
Sep 30th 2016, 14:32 |
Neon1024 |
ADmad would be most dissapointed! ;) |
# |
Sep 30th 2016, 14:31 |
Neon1024 |
Eish! |
# |
Sep 30th 2016, 14:31 |
birdy247 |
I just copy/pasted the beforeDelete from the plugin to start with |
# |
Sep 30th 2016, 14:31 |
Neon1024 |
I did update the docs! :D |
# |
Sep 30th 2016, 14:30 |
Neon1024 |
Have you got the event priorities setup right? |
# |
Sep 30th 2016, 14:30 |
Neon1024 |
What does your beforeDelete do thatâ??s special? |
# |
Sep 30th 2016, 14:29 |
birdy247 |
It seems, using this, it does not honour the cascade callbacks |
# |
Sep 30th 2016, 14:29 |
birdy247 |
I decided to handle the beforeDelete myself |
# |
Sep 30th 2016, 14:29 |
birdy247 |
I am using muffin/Trash |
# |
Sep 30th 2016, 14:28 |
Neon1024 |
o |
# |
Sep 30th 2016, 14:28 |
birdy247 |
Neon1024 |
# |
Sep 30th 2016, 14:27 |
Neon1024 |
I did it in this plugin, https://github.com/UseMuffin/Trash/pull/12 |
# |
Sep 30th 2016, 14:27 |
admad |
@birdy247 yes it should |
# |
Sep 30th 2016, 14:27 |
Neon1024 |
Otherwise all the callbacks are skipped |
# |
Sep 30th 2016, 14:27 |
Neon1024 |
All it does is enable callback methods for bulk transactional updates |
# |
Sep 30th 2016, 14:27 |
Neon1024 |
Yeah, on the primary model |
# |
Sep 30th 2016, 14:26 |
birdy247 |
I thought that was what cascadeCallbacks was for? |
# |
Sep 30th 2016, 14:26 |
Neon1024 |
Iâ??d check the core unit tests for that |
# |
Sep 30th 2016, 14:26 |
Neon1024 |
Probably not |
# |
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 |