E
E
EVOSandru62015-12-29 04:29:07
Yii
EVOSandru6, 2015-12-29 04:29:07

How to auto-substitute lft, rgd for a nestedSet table that has only id and parent_id?

Good day!
There is a table with a thousand records, which has id , prent_id and level .
I connect behavior for Yii NestedSetBehavior .
It is very desirable not to hammer lft and rgd manually. Help advice!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aleksey Bernackiy, 2015-01-08
@usualdesigner

Use the api methods of the behavior you specified.
Also, don't forget that the hierarchical
nestedSet model allows you to specify the order of the elements of the same parent. This is what the lft and rgd keys are for. If this is not important, maybe you should choose a different storage model for hierarchical data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question