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
myEntityPanacheQuery.page(Page.of(pageNumber, pageSize)).list(); // it is good work
myEntityPanacheQuery.count(); // it is return exception
method count() is return exception: io.quarkus.panache.common.exception.PanacheQueryException: Count query not supported for select query: FROM com.MyEntity WHERE field like :field and (1 = :value1 OR (field2 = :field2)) at io.quarkus.hibernate.orm.panache.common.runtime.CommonPanacheQueryImpl.countQuery(CommonPanacheQueryImpl.java:252) at io.quarkus.hibernate.orm.panache.common.runtime.CommonPanacheQueryImpl.count(CommonPanacheQueryImpl.java:214) at io.quarkus.hibernate.orm.panache.runtime.PanacheQueryImpl.count(PanacheQueryImpl.java:144) at com.bivgroup.soglacie.rra.service.journal.jra.WorkAgentJournalService.lambda$loadJournalResult$1(WorkAgentJournalService.java:39) at io.smallrye.mutiny.operators.UniMapOnResult$1.onItem(UniMapOnResult.java:31)
If remove line break characters from where string, when countQuery will be to work well.
I think FROM_PATTERN in CommonPanacheQueryImpl class it should be replaced Pattern.compile("^\\s*FROM\\s+.*", Pattern.CASE_INSENSITIVE); on Pattern.compile("^\s*FROM\s+(.|\n)*", Pattern.CASE_INSENSITIVE); or similar that patter processed line break characters (\n).
Quarkus version 1.5.2
The text was updated successfully, but these errors were encountered:
I've had similar problems with Text Blocks but didn't open an issue because they are still a preview feature. Hopefully this fix will resolve those as well. Thanks for your work!
I have base functional for create where string, it create string with line break characters (\n).
code:
method count() is return exception:
io.quarkus.panache.common.exception.PanacheQueryException: Count query not supported for select query: FROM com.MyEntity WHERE field like :field and (1 = :value1 OR (field2 = :field2)) at io.quarkus.hibernate.orm.panache.common.runtime.CommonPanacheQueryImpl.countQuery(CommonPanacheQueryImpl.java:252) at io.quarkus.hibernate.orm.panache.common.runtime.CommonPanacheQueryImpl.count(CommonPanacheQueryImpl.java:214) at io.quarkus.hibernate.orm.panache.runtime.PanacheQueryImpl.count(PanacheQueryImpl.java:144) at com.bivgroup.soglacie.rra.service.journal.jra.WorkAgentJournalService.lambda$loadJournalResult$1(WorkAgentJournalService.java:39) at io.smallrye.mutiny.operators.UniMapOnResult$1.onItem(UniMapOnResult.java:31)
If remove line break characters from where string, when countQuery will be to work well.
I think FROM_PATTERN in CommonPanacheQueryImpl class it should be replaced
Pattern.compile("^\\s*FROM\\s+.*", Pattern.CASE_INSENSITIVE);
onPattern.compile("^\s*FROM\s+(.|\n)*", Pattern.CASE_INSENSITIVE)
; or similar that patter processed line break characters (\n).Quarkus version 1.5.2
The text was updated successfully, but these errors were encountered: