Commit graph

4 commits

Author SHA1 Message Date
Bob Van Landuyt
26c4e47a0d Preload ancestors for subgroups matching filter
Otherwise we'd only preload the ancestors that would fit the
page. That way, when a search result was on the first page, but the
ancestor didn't fit the page anymore. We would not have the preloaded
ancestor when rendering the hierarchy.
2018-01-22 17:02:04 +01:00
Bob Van Landuyt
5a335c4d95 Remove the selects when counting the last page
The last page of the first collection is only loaded into memory when
it is being viewed. If it isn't loaded into memory, the `#size` call
triggers a count query.

This `#count` would generate an invalid query if our custom preloaded
counts are included by adding a separate `as count_column` alias on
top of the count aliases. Removing the selects in this case will make
sure a valid `COUNT(*)` is generated.
2017-11-17 16:20:47 +01:00
Bob Van Landuyt
4d79159973 Make sure we always return an array of hierarchies
Even when we pass an array of only a single object
2017-10-13 15:15:45 +02:00
Bob Van Landuyt
2c25a7ae34 Nest the group_children_path inside the canonical group path 2017-10-12 11:36:55 +02:00