Well I was looking at this because I am creating a hierarchical relationship field that will display as follows:
Root
|---- Child 1
|---- Child 1.2
|---- Child 2
|---- Child 2.1
|---- Child 2.2
So what I’m envisioning is that the field_id_x will store the relationship id, just like a normal relationship field would, then, the difference would be, the entry id would get put into a separate table containing the hierarchy of the field. So that when the field is called in the template it uses the normal relationship code, but when displayed in the CP the user sees a nested list.
So….The reason I need to pull ALL of the data is because when a user is entering an entry they should be able to choose to parent the entry with ANY other entry. I guess I’m a little confused because there won’t always be one root node, there may be 10 - 1000.
Finally, a little background: this extension will be used to create a nested list of corporate branches around the world. So you could log in and enter a new “Branch” (that’s the weblog). Then you’d fill in all the info along with the branch; address, phone, email etc. Then the last field is “Branch Parent” which lets you choose, from that nested list, another entry to parent this one to. So, in this example one might log in and create a branch named “USA” then create a branch named “California”, and parent that branch to “USA”. At last they may create a branch named “San Francisco”, and parent that branch to “California”. Then what they would see, if they were to enter another branch (say, Colorado), in that field would be a nested list as follows:
USA
|---- California
|---- San Francisco
Which is obviously much easier to scan and find the parent you are looking for.