Welcome Guest, Not a member yet? Register   Sign In
Can I use MPTTree with multi trees in one Table ??
#1

[eluser]Mahmoud M. Abdel-Fattah[/eluser]
I want to use MPTTree in products table in Web App, so each user will have his/her products tree.

so, There will be a column called user_id ! will this make some confusion to calculation functions ? or it'll be fine ?
#2

[eluser]TheFuzzy0ne[/eluser]
I don't think that MPTTree has been designed to work with multiple trees. Technically, each tree should have it's own table. I might be wrong here, but I'm sure that you can't manipulate multiple trees within the same table. A way to get around this, might be to give each user a top node in that tree (just under the root node), however, I'm not sure if this will cause problems if you're tree becomes too big.




Theme © iAndrew 2016 - Forum software by © MyBB