Closed Velm14 closed 9 years ago
Can you provide more details? You can get parent by using corresponding method.
no-no, I want to do it with Eager loading, I want to degreese count of queries
such as joinWith('parent')
To define relations you need foreign keys. Nested Sets by its nature do not work with node foreign keys. So you have option like add additional parent_id
column and corresponding logic to model to control it.
You say that I must reset value of 'parent_id' every time when I change my node ?
As i said before if you need relation you need foreign key. How you will control parent_id
its your own choice. Such functionality is very specific and out of nested set behavior responsibility.
Hello to everyone, I really need parent relation in nested set Yii2, I done this in Yii1.0.1, but how I can do this in second version. If developers read it, pls make a chance to do Eager loading parent in Yii2 I am missing "parent" relation. I mean, that I can not do Eager loading in relation ( I canno't write such relation )