Skip to content
New issue

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

MongoDB Panache - Consistently encode list with [] #42699

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Aug 22, 2024

While this is a breaking change for native queries (see the updated tests), I think we shouldn't have to add the [] when dealing with lists: that's not something you do in HQL, it shouldn't be something you have to do in native. You have your parameter as ?1 and if the value is a list, it gets properly encoded.

Fixes #27326

@loicmathieu could you have a look at this one? I think it's for the better.

Note that I had some weird test failures that might or might not be related locally but I couldn't reproduce them when running the failing test in isolation so I'm not sure what's going on...

This comment has been minimized.

@loicmathieu
Copy link
Contributor

I'm OK with the change and understand the rationale.

The documentation guide should be updated here: https://quarkus.io/guides/mongodb-panache#simplified-queries

Copy link
Contributor

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

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

LGTM, please update the guide in the section I mentioned before merging

@gsmet
Copy link
Member Author

gsmet commented Aug 22, 2024

Made some slight doc adjustments.

While this is a breaking change for native, I think we shouldn't have to
add the [] when dealing with lists: that's not something you do in HQL,
it shouldn't be something you have to do in native.

Fixes quarkusio#27326
Copy link

quarkus-bot bot commented Aug 22, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit b05735d.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

github-actions bot commented Aug 22, 2024

🙈 The PR is closed and the preview is expired.

Copy link

quarkus-bot bot commented Aug 22, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit b05735d.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@gsmet gsmet merged commit 28ce264 into quarkusio:main Aug 22, 2024
24 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

MongoDB panache generates invalid update documents when updating a list or array with HQL
2 participants