You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For an AR model VirtualPath used for a DB based file system, we use this excellent gem.
When loading a bunch of the models after applying access control and other restrictions, we build up the hierarchy for a recursive "ls" style output and use ancestry_path for the parts.
To speed up loading the ancestors, we try to use eager loading:
However, this mixes up the order of the ancestry path elements.
For an AR model
VirtualPath
used for a DB based file system, we use this excellent gem.When loading a bunch of the models after applying access control and other restrictions, we build up the hierarchy for a recursive "ls" style output and use
ancestry_path
for the parts.To speed up loading the ancestors, we try to use eager loading:
However, this mixes up the order of the ancestry path elements.
Example queries and output:
Any solutions to this? Other users seem to cache the ancestry_path for speeding up this use case..
Can't this be done with AR queries only?
The text was updated successfully, but these errors were encountered: