{"record":{"id":"f73253c80552e368","repo":"hibernate/hibernate-orm","slug":"unknown-type-searchability-code-code-encounte","errorCode":null,"errorMessage":"Unknown type searchability code [${code}] encountered","messagePattern":"Unknown type searchability code \\[(.+?)\\] encountered","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/engine/jdbc/spi/TypeSearchability.java","lineNumber":50,"sourceCode":"\t * @see DatabaseMetaData#typePredBasic\n\t */\n\tBASIC;\n\n\t/**\n\t * Based on the code retrieved from {@link DatabaseMetaData#getTypeInfo()} for the {@code SEARCHABLE}\n\t * column, return the appropriate enum.\n\t *\n\t * @param code The retrieved code value.\n\t *\n\t * @return The corresponding enum.\n\t */\n\tpublic static TypeSearchability interpret(short code) {\n\t\treturn switch (code) {\n\t\t\tcase DatabaseMetaData.typeSearchable -> FULL;\n\t\t\tcase DatabaseMetaData.typePredNone -> NONE;\n\t\t\tcase DatabaseMetaData.typePredBasic -> BASIC;\n\t\t\tcase DatabaseMetaData.typePredChar -> CHAR;\n\t\t\tdefault -> throw new IllegalArgumentException( \"Unknown type searchability code [\" + code + \"] encountered\" );\n\t\t};\n\t}\n}\n","sourceCodeStart":32,"sourceCodeEnd":54,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/engine/jdbc/spi/TypeSearchability.java#L32-L54","documentation":"Error \"Unknown type searchability code [${code}] encountered\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/spi/TypeSearchability.java:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid DatabaseMetaData typeSearchability code when constructing TypeSearchability","Handle unexpected codes defensively rather than relying on raw metadata values"],"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"}