{"record":{"id":"00caf8728f377e6e","repo":"hibernate/hibernate-orm","slug":"could-not-resolve-propertyaccess-for-attribute-s-00caf8","errorCode":null,"errorMessage":"Could not resolve PropertyAccess for attribute `%s#%s`","messagePattern":"Could not resolve PropertyAccess for attribute `(.+?)#(.+?)`","errorType":"exception","errorClass":"HibernateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassRepresentationStrategy.java","lineNumber":73,"sourceCode":"\t\treturn RepresentationMode.POJO;\n\t}\n\n\t@Override\n\tpublic ReflectionOptimizer getReflectionOptimizer() {\n\t\treturn null;\n\t}\n\n\t@Override\n\tpublic JavaType<?> getMappedJavaType() {\n\t\treturn idClassType;\n\t}\n\n\t@Override\n\tpublic PropertyAccess resolvePropertyAccess(Property bootAttributeDescriptor) {\n\t\tfinal var strategy = bootAttributeDescriptor.getPropertyAccessStrategy( idClassType.getJavaTypeClass() );\n\n\t\tif ( strategy == null ) {\n\t\t\tthrow new HibernateException(\n\t\t\t\t\tString.format(\n\t\t\t\t\t\t\tLocale.ROOT,\n\t\t\t\t\t\t\t\"Could not resolve PropertyAccess for attribute `%s#%s`\",\n\t\t\t\t\t\t\tidClassType.getTypeName(),\n\t\t\t\t\t\t\tbootAttributeDescriptor.getName()\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn strategy.buildPropertyAccess(\n\t\t\t\tidClassType.getJavaTypeClass(),\n\t\t\t\tbootAttributeDescriptor.getName(),\n\t\t\t\tfalse\n\t\t);\n\t}\n}\n","sourceCodeStart":55,"sourceCodeEnd":90,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassRepresentationStrategy.java#L55-L90","documentation":"Error \"Could not resolve PropertyAccess for attribute `%s#%s`\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when building the IdClass representation strategy and no PropertyAccess (field or getter/setter) can be resolved for one of the id attributes.","commonSituations":"See trigger scenarios.","solutions":["Ensure the IdClass declares a readable property (field or getter) for the named attribute.","Check that IdClass attribute names and types match the entity's id attributes exactly."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}