Guarantee findAllChildrenUuids results order#809
Guarantee findAllChildrenUuids results order#809Meklo wants to merge 6 commits intouse-modifications_order-for-copositesfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…sites' into marcellinh/fix-findAllChildrenUuids-result-order
…sites' into marcellinh/fix-findAllChildrenUuids-result-order
…fix-findAllChildrenUuids-result-order
|
| @NativeQuery("WITH RECURSIVE ModificationHierarchy (modification_id, path) AS ( " + | ||
| " SELECT cast(:compositeUuid AS VARCHAR), ARRAY[0] " + | ||
| " UNION ALL " + | ||
| " SELECT cast(sm.modification_id AS VARCHAR), mh.path || (m.modifications_order + 1) " + |
There was a problem hiding this comment.
I don't think the "+ 1" is useful :
| " SELECT cast(sm.modification_id AS VARCHAR), mh.path || (m.modifications_order + 1) " + | |
| " SELECT cast(sm.modification_id AS VARCHAR), mh.path || m.modifications_order " + |
| " INNER JOIN ModificationHierarchy mh ON m.id = mh.id " + | ||
| ") " + | ||
| "SELECT distinct cast(m.id AS VARCHAR) FROM ModificationHierarchy m ") | ||
| @NativeQuery("WITH RECURSIVE ModificationHierarchy (modification_id, path) AS ( " + |
There was a problem hiding this comment.
I would add a small comment like :
// returns the composite uuid and its children and subchildren's uuids
because the request is a bit complicated and it is not very logical that compositeUuid is returned given the function name (findAllChildrenUuids).



PR Summary