{"record":{"id":"8ce1e003fc97d3d5","repo":"hibernate/hibernate-orm","slug":"oracle-array-constructor-emulation-requires-a-basi","errorCode":null,"errorMessage":"Oracle array constructor emulation requires a basic plural return type, but resolved return type was: \" + returnType","messagePattern":"Oracle array constructor emulation requires a basic plural return type, but resolved return type was: \" \\+ returnType","errorType":"exception","errorClass":"SemanticException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/function/array/OracleArrayConstructorFunction.java","lineNumber":34,"sourceCode":"public class OracleArrayConstructorFunction extends ArrayConstructorFunction {\n\n\tpublic OracleArrayConstructorFunction(boolean list) {\n\t\tsuper( list, false );\n\t}\n\n\t@Override\n\tpublic void render(\n\t\t\tSqlAppender sqlAppender,\n\t\t\tList<? extends SqlAstNode> sqlAstArguments,\n\t\t\tReturnableType<?> returnType,\n\t\t\tSqlAstTranslator<?> walker) {\n\t\tif ( returnType == null ) {\n\t\t\tthrow new SemanticException(\n\t\t\t\t\t\"Oracle array constructor emulation requires knowledge about the return type, but resolved return type could not be determined\"\n\t\t\t);\n\t\t}\n\t\tif ( !(returnType instanceof BasicPluralType<?, ?> pluralType) ) {\n\t\t\tthrow new SemanticException(\n\t\t\t\t\t\"Oracle array constructor emulation requires a basic plural return type, but resolved return type was: \" + returnType\n\t\t\t);\n\t\t}\n\t\tfinal String arrayTypeName = DdlTypeHelper.getCastTypeName(\n\t\t\t\tpluralType,\n\t\t\t\twalker.getSessionFactory().getTypeConfiguration()\n\t\t);\n\t\tsqlAppender.appendSql( arrayTypeName );\n\t\tfinal int size = sqlAstArguments.size();\n\t\tif ( size == 0 ) {\n\t\t\tsqlAppender.append( '(' );\n\t\t}\n\t\telse {\n\t\t\tchar separator = '(';\n\t\t\tfor ( int i = 0; i < size; i++ ) {\n\t\t\t\tSqlAstNode argument = sqlAstArguments.get( i );\n\t\t\t\tsqlAppender.append( separator );\n\t\t\t\targument.accept( walker );","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/function/array/OracleArrayConstructorFunction.java#L16-L52","documentation":"Error \"Oracle array constructor emulation requires a basic plural return type, but resolved return type was: \" + returnType\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Oracle array constructor emulation requires a basic plural return type.","commonSituations":"Common when running against a database whose dialect lacks this capability, when a mapping or HQL/Criteria query requests unsupported functionality, or when the wrong dialect is configured for the database in use. Error: Oracle array constructor emulation requires a basic plural return type.","solutions":["Ensure the array constructor has a basic plural (array) return type."],"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"}