{"record":{"id":"ba76608ccf4ba4f7","repo":"quarkusio/quarkus","slug":"hints-not-supported-yet","errorCode":null,"errorMessage":"Hints not supported yet","messagePattern":"Hints not supported yet","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"extensions/panache/hibernate-reactive-panache-common/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/common/runtime/CommonAbstractPanacheQueryImpl.java","lineNumber":240,"sourceCode":"            throw new UnsupportedOperationException(\"Cannot call a range related method, \" +\n                    \"call range(int, int) to initiate range first\");\n        }\n        if (page != null) {\n            throw new UnsupportedOperationException(\"Cannot call a range related method in a paged query, \" +\n                    \"call range(int, int) to initiate range first\");\n        }\n    }\n\n    public void withLock(LockModeType lockModeType) {\n        this.lockModeType = lockModeType;\n    }\n\n    public void withHint(String hintName, Object value) {\n        if (hints == null) {\n            hints = new HashMap<>();\n        }\n        hints.put(hintName, value);\n        throw new UnsupportedOperationException(\"Hints not supported yet\");\n    }\n\n    // Results\n\n    @SuppressWarnings(\"unchecked\")\n    public Uni<Long> count() {\n        if (count == null) {\n            // FIXME: question about caching the result here\n            count = em.flatMap(session -> {\n                if (customCountQueryForSpring != null) {\n                    Mutiny.SelectionQuery<Long> countQuery = session.createSelectionQuery(customCountQueryForSpring,\n                            Long.class);\n                    if (paramsArrayOrMap instanceof Map)\n                        AbstractJpaOperations.bindParameters(countQuery, (Map<String, Object>) paramsArrayOrMap);\n                    else\n                        AbstractJpaOperations.bindParameters(countQuery, (Object[]) paramsArrayOrMap);\n                    return applyFilters(session, () -> countQuery.getSingleResult());\n                } else {","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/panache/hibernate-reactive-panache-common/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/common/runtime/CommonAbstractPanacheQueryImpl.java#L222-L258","documentation":"withHint(String,Object) on the Hibernate Reactive Panache query impl accepts the hint into its map but then unconditionally throws UnsupportedOperationException(\"Hints not supported yet\"). Query hints are simply not implemented for Hibernate Reactive Panache yet; the method exists for API parity with the blocking variant. Any call to it fails regardless of arguments.","triggerScenarios":"Any call to PanacheQuery.withHint(String hintName, Object value) on a Hibernate Reactive Panache query.","commonSituations":"Porting blocking Hibernate ORM Panache code (where withHint works) to hibernate-reactive-panache; adding cache/lock hints like org.hibernate.cacheable or org.hibernate.fetchSize copied from blocking code.","solutions":["Remove the withHint(...) call; there is no reactive Panache support yet.","Set equivalent configuration via Hibernate Reactive session/persistence-unit properties in application.properties (e.g. SQL/logging settings) rather than per-query hints.","For fetch-size-like behavior, restructure the query (fetch joins, limits) instead of relying on hints.","Track upstream Hibernate Reactive support for query hints before re-adding the call."],"exampleFix":"// before\nPanacheQuery<Person> q = Person.find(\"age > ?1\", 18).withHint(\"org.hibernate.fetchSize\", 50);\n\n// after\nPanacheQuery<Person> q = Person.find(\"age > ?1\", 18); // hints not supported reactively","handlingStrategy":"validation","validationCode":"// never call withHint on hibernate-reactive Panache queries\nObjects.requireNonNull(hintName); // not sufficient — method always throws; remove the call","typeGuard":null,"tryCatchPattern":"try { query.withHint(name, value); } catch (UnsupportedOperationException e) { log.warn(\"Hints unsupported on hibernate-reactive Panache; ignored\"); }","preventionTips":["Do not port withHint() calls from blocking Panache to hibernate-reactive Panache","Apply equivalent settings via persistence-unit properties in application.properties","Check the Hibernate Reactive issue tracker for hint support before using this API"],"tags":["panache","hibernate-reactive","query-hints","unsupported-operation"],"backgroundTag":"reactive-feature-not-implemented","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}