It seems a closure tree storage could be simpler than a nested set storage like the one currently used.

Attached is a standalone module implementing this type of storage, hopefully pluggable into this module, as I haven't yet had time to understand the structure of all the files involved in the current module implementation.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

fgm’s picture

Title: Closure Tree storage » Closure Table Tree storage

incomplete title!

axel.rutz’s picture

first: damien thanks for hacking this together!!

then a big +1 for this issue.

if someone wants to come the conclusion themself that closuretable is a stron implementation see the links in #277312-9: Propose your change to taxonomy module in core

fgm’s picture

Better version coming hopefully this week: it already includes two fixes over the previous one, preventing illegal moves (node to one of its children) and illegal adds (multiple roots).

fgm’s picture

Status: Active » Needs work
FileSize
16.88 KB

Better version, now with some integrity tests and start of a test suite.

mitchell’s picture

FileSize
1.35 MB

* chx has an interesting storage optimization in Entity Tree.
* Could it be made into a pluggable backend for this patch?
* #1669052: Port to a backend storage mechanism for Entity Reference's Tree plugin would be a better place to discuss.
* This entity_tree presentation he posted in #28480: Create generalized relationship module explains it very well.