You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Panache MongoDB doesn't support collation for count.
Taking a look in the io.quarkus.mongodb.panache.common.runtime.CommonPanacheQueryImpl and io.quarkus.mongodb.panache.common.reactive.runtime.CommonReactivePanacheQueryImpl we can see the method count doesn't support collation.
Native queries and panache queries already support this, we can confirm in this PR from @loicmathieu already merged.
I implemented the fix, basically I changed a small piece in CommonReactivePanacheQueryImpl and CommonPanacheQueryImpl:
public Uni<Long> count() {
if (count == null) {
CountOptions countOptions = new CountOptions();
if (collation != null) {
countOptions.collation(collation);
}
count = mongoQuery == null
? collection.countDocuments()
: collection.countDocuments(mongoQuery, countOptions);
}
return count;
}
public long count() {
if (count == null) {
Bson query = getQuery();
CountOptions countOptions = new CountOptions();
if (collation != null) {
countOptions.collation(collation);
}
count = clientSession == null
? collection.countDocuments(query, countOptions)
: collection.countDocuments(clientSession, query, countOptions);
}
return count;
}
Here is the PR, let me know if I need to change something.
Best regards.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Panache MongoDB doesn't support
collation
forcount
.Taking a look in the
io.quarkus.mongodb.panache.common.runtime.CommonPanacheQueryImpl
andio.quarkus.mongodb.panache.common.reactive.runtime.CommonReactivePanacheQueryImpl
we can see the methodcount
doesn't supportcollation
.Native queries and panache queries already support this, we can confirm in this PR from @loicmathieu already merged.
I implemented the fix, basically I changed a small piece in
CommonReactivePanacheQueryImpl
andCommonPanacheQueryImpl
:Here is the PR, let me know if I need to change something.
Best regards.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: