We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At the moment the method self_and_descendant_ids runs a pluck on the self_and_descendants method.
self_and_descendant_ids
self_and_descendants
So we get SQL (for a model 'DirectoryEntry') as follows:
SELECT `directory_entries`.`id` FROM `directory_entries` INNER JOIN `directory_entry_hierarchies` ON `directory_entries`.`id` = `directory_entry_hierarchies`.`descendant_id` WHERE `directory_entry_hierarchies`.`ancestor_id` = 2 ORDER BY `directory_entry_hierarchies`.generations asc
Shouldn't it be possible to just change this logic to just use the [directory_entry_]hierarchies table to do something like:
SELECT `directory_entry_hierarchies`.`descendant_id` FROM `directory_entry_hierarchies` WHERE `directory_entry_hierarchies`.`ancestor_id` = 2
(not sure the ORDER BY is necessary?)
Please let me know what you think and I can write a PR.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At the moment the method
self_and_descendant_ids
runs a pluck on theself_and_descendants
method.So we get SQL (for a model 'DirectoryEntry') as follows:
Shouldn't it be possible to just change this logic to just use the [directory_entry_]hierarchies table to do something like:
(not sure the ORDER BY is necessary?)
Please let me know what you think and I can write a PR.
The text was updated successfully, but these errors were encountered: