Skip to content

Guarantee findAllChildrenUuids results order#809

Open
Meklo wants to merge 6 commits intouse-modifications_order-for-copositesfrom
marcellinh/fix-findAllChildrenUuids-result-order
Open

Guarantee findAllChildrenUuids results order#809
Meklo wants to merge 6 commits intouse-modifications_order-for-copositesfrom
marcellinh/fix-findAllChildrenUuids-result-order

Conversation

@Meklo
Copy link
Copy Markdown
Contributor

@Meklo Meklo commented Apr 29, 2026

PR Summary

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fc88f118-ae07-4718-a4ce-d3658b202432

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Hugo Marcellin and others added 5 commits May 4, 2026 11:04
…sites' into marcellinh/fix-findAllChildrenUuids-result-order
…sites' into marcellinh/fix-findAllChildrenUuids-result-order
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

@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) " +
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the "+ 1" is useful :

Suggested change
" 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 ( " +
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants