{"record":{"id":"20e2db85fb139d76","repo":"hibernate/hibernate-orm","slug":"unsupported-value-type-value-getclass","errorCode":null,"errorMessage":"Unsupported value type: ${value.getClass()}","messagePattern":"Unsupported value type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/SqmMutationStrategyHelper.java","lineNumber":383,"sourceCode":"\t\t\tforEachSelectableMapping(\n\t\t\t\t\tprefix + \"_key\",\n\t\t\t\t\tany.getKeyDescriptor() != null ? any.getKeyDescriptor() : any.getKeyMapping(),\n\t\t\t\t\tconsumer\n\t\t\t);\n\t\t}\n\t\telse if ( value instanceof Component component) {\n\t\t\tfinal int propertySpan = component.getPropertySpan();\n\t\t\tfor ( int i = 0; i < propertySpan; i++ ) {\n\t\t\t\tfinal Property property = component.getProperty( i );\n\t\t\t\tfinal String newPrefix = component.isEmbedded() ? property.getName() : prefix + \"_\" + property.getName();\n\t\t\t\tforEachSelectableMapping( newPrefix, property.getValue(), consumer );\n\t\t\t}\n\t\t}\n\t\telse if ( value instanceof OneToMany || value instanceof Collection ) {\n\t\t\t// No-op\n\t\t}\n\t\telse {\n\t\t\tthrow new UnsupportedOperationException( \"Unsupported value type: \" + value.getClass() );\n\t\t}\n\t}\n\n\tprivate static int findTableIndex(EntityPersister declaringEntityPersister, String tableExpression) {\n\t\tfinal String[] tableNames = declaringEntityPersister.getTableNames();\n\t\tfor ( int i = 0; i < tableNames.length; i++ ) {\n\t\t\tif ( tableExpression.equals( tableNames[i] ) ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalStateException( \"Couldn't find table index for [\" + tableExpression + \"] in: \" + declaringEntityPersister.getEntityName() );\n\t}\n}\n","sourceCodeStart":365,"sourceCodeEnd":397,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/SqmMutationStrategyHelper.java#L365-L397","documentation":"Error \"Unsupported value type: ${value.getClass()}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An API operation is invoked on a query object that does not support it.","commonSituations":"Calling query hint, locking, pagination, conversion, or mutation APIs on a query kind (native vs HQL, select vs mutation) that does not implement them.","solutions":["A value of an unsupported type was passed in a mutation statement.","Pass values of mapped/basic types, or add a converter/type mapping for the value class."],"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"}