Comments (9)
There's a fix for that in ORM 6.5.3. I'll make a PR to fix this when we upgrade to that version.
from quarkus.
/cc @FroMage (panache), @loicmathieu (panache)
from quarkus.
Hi,
Thanks for reporting. This is due to you calling a count()
method on a query where one of the parameter is only used in the order by
clause, which is not used by the count
query (ordering is not useful for counting). That's rather unfortunate.
I'm not sure yet how to fix this.
As a workaround, you can drop the location
parameter when using count
.
from quarkus.
I could use the HQL parser to verify which parameters to not bind from the count query, but that's going to make it more expensive for everyone.
from quarkus.
I could try using the new API for counting results in ORM :)
from quarkus.
It appears to. Good news, this makes it upstream's problem next time it happens. But it breaks projections, I have to look at that.
from quarkus.
Thank you for your work. I am using paging query and I do not want to open a query to count.
PanacheQuery<Store> page = find(query, params).page(Page.of(0, 10));
long count = page.count();
List<Store> list = page.list();
from quarkus.
I've reported https://hibernate.atlassian.net/browse/HHH-18234
from quarkus.
Thank you for your work. I am using paging query and I do not want to open a query to count.
I understand, but in any case there will always be two queries, as the count query is executed separately, even if you don't see it. So as a workaround, to get you unstuck until we have a fix, you can create a separate query for counting.
from quarkus.
Related Issues (20)
- Support optional @QueryParam on Rest client HOT 1
- Stork native is throwing a BuildException exception when the app is built HOT 6
- [Extension Proposal] Zenei authentication extension HOT 7
- @QuarkusComponentTest doesn't initialize injected beans HOT 1
- Freeze on start during liquibase step HOT 5
- Quarkus REST: further support for record parameter containers HOT 1
- @NamedDynamoDbTable applicable to parameters would enable constructor injection HOT 4
- Extensions created with 999-SNAPSHOT cli depend on non-existing plugin HOT 3
- io.fabric8:kubernetes-client in main is not binary compatible with the one in Quarkus 3.13 HOT 11
- use org.bson.conversions.Bson instead of org.bson.Document in PanacheMongoEntityBase HOT 4
- Add exclude paths to OpenTelemetry Tracing HOT 1
- Add OpenTelemetry Tracing instrumentation to the JDK HTTP client. HOT 1
- Quarkus 3.11: why do the quarkus-smallrye-openapi extension expose a "fail" endpoint ? HOT 2
- Cannot project Panache entity with null @OneToOne reference HOT 1
- Define format of config model included in jars for IDE consumption HOT 1
- Include guide in config model generated by extension annotation processor when available HOT 2
- security-oauth2-quickstart is failing with main (at least) HOT 5
- ClassNotFoundException with langchain4j 0.17 and Quarkus 3.13.3 HOT 2
- Update commons-lang3 to > 3.14.0 eventually
- Reactive REST endpoints do not handle trailing slashes for paths w/ regex HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus.