# |
Jul 18th 2017, 09:10 |
dakota |
https://api.cakephp.org/2.9/source-class-TreeBehavior.html#46-49 |
# |
Jul 18th 2017, 09:09 |
MartOn |
its basically that I am looking for. I found 2 repos.. but the lack tests and did not work on my 100 000 node tree at least |
# |
Jul 18th 2017, 09:09 |
MartOn |
dakota - v2 does not support scope. AFAIK |
# |
Jul 18th 2017, 09:08 |
dakota |
Haven’t written any 2.x code for nearly 3 years |
# |
Jul 18th 2017, 09:08 |
dakota |
If I remember correctly, the 2.x behaviour works the same/similar |
# |
Jul 18th 2017, 09:08 |
dakota |
Documentation on 3.x: https://book.cakephp.org/3.0/en/orm/behaviors/tree.html#scoping-and-multi-trees |
# |
Jul 18th 2017, 09:08 |
dakota |
using the scope option |
# |
Jul 18th 2017, 09:08 |
dakota |
I think it can |
# |
Jul 18th 2017, 09:07 |
dakota |
Oh right :slightly_smiling_face: You mean multiple trees |
# |
Jul 18th 2017, 09:07 |
MartOn |
dakota - Yes. but still there is only one set of lft-rght values? |
# |
Jul 18th 2017, 09:06 |
dakota |
A root is simply a node with a parent_id of null |
# |
Jul 18th 2017, 09:06 |
MartOn |
dakota - where is that documented? |
# |
Jul 18th 2017, 09:06 |
dakota |
You can have as many roots as you want |
# |
Jul 18th 2017, 09:06 |
dakota |
It does |
# |
Jul 18th 2017, 09:06 |
dakota |
What? The tree behaviour? |
# |
Jul 18th 2017, 09:05 |
MartOn |
dakota - does it support multiple root nodes in cake 2? |
# |
Jul 18th 2017, 09:04 |
slackebot |
~slackebot |
# |
Jul 18th 2017, 09:04 |
slackebot |
Command sent from Slack by dakota: |
# |
Jul 18th 2017, 09:03 |
MartOn |
slackebot does it support multiple root nodes in cake 2? |
# |
Jul 18th 2017, 09:03 |
dakota |
Ah, MPTT trees tend to have issues with a large number of nodes |
# |
Jul 18th 2017, 09:02 |
MartOn |
not able to reproduce what is causing the corruption, so need to limit affected rows on insert. |
# |
Jul 18th 2017, 09:02 |
MartOn |
Struggling with TreeBehaviour tree corruption all the time now in a tree with approx 100 000 nodes. |
# |
Jul 18th 2017, 09:01 |
dakota |
The built in tree behaviour supports multiple root nodes |
# |
Jul 18th 2017, 09:01 |
MartOn |
Does any1 know if there is a working Nested set behaviour that supports multiple root nodes available for Cake2.x? with working tests.. |
# |
Jul 18th 2017, 08:57 |
neon1024 |
Would be `example.com/example_plugin/examples/first` |
# |
Jul 18th 2017, 08:57 |
neon1024 |
`['controller' => 'Examples', 'action' => 'first', 'plugin' => 'ExamplePlugin']` |
# |
Jul 18th 2017, 08:56 |
neon1024 |
Usually just add the plugin to your route `'plugin' => 'MyPlugin'` |
# |
Jul 18th 2017, 08:51 |
juststeveking |
How do I route to a plugin controller in cake2 |
# |
Jul 18th 2017, 08:37 |
ono-t |
Yes,work.See Collection.php. I was clogged there yesterday. sorry,poor english. |
# |
Jul 18th 2017, 08:37 |
hagen00 |
->find('children', ['for' => $answer->id])->order(['sort_order' => 'ASC']); |
# |
Jul 18th 2017, 08:37 |
hagen00 |
anyone know why this doesn't work (tree behaviour. Trying to sort the children by a DB field)? |
# |
Jul 18th 2017, 08:34 |
cakephp586 |
works with bake? |
# |
Jul 18th 2017, 08:33 |
ono-t |
Using Trait is one answer |
# |
Jul 18th 2017, 08:29 |
ono-t |
table prefix? https://stackoverflow.com/questions/28792720/cakephp-3-0-using-tableprefix. |
# |
Jul 18th 2017, 08:19 |
cakephp586 |
and for bake command? |
# |
Jul 18th 2017, 08:14 |
neon1024 |
Morning everyone |
# |
Jul 18th 2017, 07:17 |
dakota |
Cake 3 doesn't have support for table prefixes. However, what you can do is have an AppTable class that overloads the table() method to prepend the orefix |
# |
Jul 18th 2017, 07:03 |
braeden |
If it ain't broke don't fix it! |
# |
Jul 18th 2017, 07:02 |
cakephp586 |
first problem: table prefix |
# |
Jul 18th 2017, 07:02 |
cakephp586 |
this morning I had the bad idea to start thinking to switch from 2 to 3 |
# |
Jul 18th 2017, 06:35 |
designskiller |
Ok |