{"record":{"id":"efcfda113f4cc8b0","repo":"quarkusio/quarkus","slug":"fieldnotresolvablemessage-detail-offendingmeth","errorCode":null,"errorMessage":"fieldNotResolvableMessage + detail + offendingMethodMessage","messagePattern":"fieldNotResolvableMessage \\+ detail \\+ offendingMethodMessage","errorType":"exception","errorClass":"UnableToParseMethodException","httpStatus":null,"severity":"error","filePath":"extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/MethodNameParser.java","lineNumber":538,"sourceCode":"            int firstSeparator = fieldPathExpression.indexOf('_', fieldStartIndex);\n            int fieldEndIndex = firstSeparator == -1 ? fieldPathExpression.length() : firstSeparator;\n            while (fieldEndIndex >= fieldStartIndex) {\n                String fieldName = fieldPathExpression.substring(fieldStartIndex, fieldEndIndex);\n                String simpleFieldName = lowerFirstLetter(fieldName);\n                fieldInfo = getFieldInfo(simpleFieldName, parentFieldInfo == null ? parentClassInfo : parentFieldInfo,\n                        parentSuperClassInfos);\n                if (fieldInfo != null) {\n                    break;\n                }\n                fieldEndIndex = previousPotentialFieldEnd(fieldPathExpression, fieldStartIndex, fieldEndIndex);\n            }\n            if (fieldInfo == null) {\n                String detail = \"\";\n                if (fieldStartIndex > 0) {\n                    String notMatched = lowerFirstLetter(fieldPathExpression.substring(fieldStartIndex));\n                    detail = \"Can not resolve \" + parentClassInfo + \".\" + notMatched + \". \";\n                }\n                throw new UnableToParseMethodException(\n                        fieldNotResolvableMessage + detail + offendingMethodMessage);\n            }\n            if (fieldPathBuilder.length() > 0) {\n                fieldPathBuilder.append('.');\n            }\n            fieldPathBuilder.append(fieldInfo.name());\n            if (!isHibernateProvidedBasicType(fieldInfo.type().name())) {\n                DotName parentClassName;\n                boolean typed = false;\n                if (fieldInfo.type().kind() == Type.Kind.TYPE_VARIABLE) {\n                    typed = true;\n                    parentClassName = getParentNameFromTypedFieldViaHierarchy(fieldInfo, mappedSuperClassInfos);\n                } else if (fieldInfo.type().kind() == Type.Kind.PARAMETERIZED_TYPE) {\n                    parentClassName = fieldInfo.type().asParameterizedType().arguments().stream().findFirst().get().name();\n                } else {\n                    parentClassName = fieldInfo.type().name();\n                }\n                parentClassInfo = indexView.getClassByName(parentClassName);","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/MethodNameParser.java#L520-L556","documentation":"A field path in a derived query method could not be resolved against the entity: either the first segment does not match any entity field, or (when the path is nested) the failing segment is reported with detail 'Can not resolve <ParentClass>.<segment>'. Throws UnableToParseMethodException at build time.","triggerScenarios":"findByFieldname(...) where 'fieldname' is not a property of the entity; nested paths like findByAddress_Zip(...) where Address has no 'zip' property; wrong casing of the first letter after parsing.","commonSituations":"Renamed or removed entity fields; typos; using DB column names instead of Java field names; referencing properties of a related entity that no longer exist after a schema change.","solutions":["Correct the field name in the method to match the entity's Java property exactly (lowerFirstLetter applies)","For nested paths use underscore separators with real property names at every level: findByAddress_City(...)","If the field truly does not exist, add it to the entity or use @Query with explicit JPQL"],"exampleFix":"// before (entity User has 'email', not 'mail')\nList<User> findByMail(String mail);\n// after\nList<User> findByEmail(String mail);","handlingStrategy":"validation","validationCode":"// Verify each path segment against entity properties:\n// boolean ok = Arrays.stream(Entity.class.getDeclaredFields()).anyMatch(f -> f.getName().equals(fieldName));","typeGuard":null,"tryCatchPattern":"try {\n    parser.parse(methodName);\n} catch (UnableToParseMethodException e) {\n    // e.getMessage() names the unresolvable parent.field — fix or replace with @Query\n    throw new IllegalStateException(\"Unresolvable field: \" + e.getMessage());\n}","preventionTips":["Use IDE rename refactoring so entity field renames propagate to derived methods","Use Java property names (camelCase), never SQL column names","Cover every repository method with a test that boots the application"],"tags":["jpa","spring-data","derived-query","field-not-found"],"backgroundTag":"entity-field-not-resolvable","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"}