{"record":{"id":"a189341f3e34b0c6","repo":"hibernate/hibernate-orm","slug":"database-not-known-to-define-a-current-timestamp-f","errorCode":null,"errorMessage":"Database not known to define a current timestamp function","messagePattern":"Database not known to define a current timestamp function","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java","lineNumber":3467,"sourceCode":"\t * value from the database?\n\t *\n\t * @return True if the current timestamp can be retrieved; false otherwise.\n\t */\n\tpublic boolean supportsCurrentTimestampSelection() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Is the command returned by {@link #getCurrentTimestampSelectString}\n\t * treated as callable?\n\t * <p>\n\t * Typically, this indicates the use of the JDBC escape syntax.\n\t *\n\t * @return {@code} if the {@link #getCurrentTimestampSelectString} is\n\t *         treated as callable; false otherwise.\n\t */\n\tpublic boolean isCurrentTimestampSelectStringCallable() {\n\t\tthrow new UnsupportedOperationException( \"Database not known to define a current timestamp function\" );\n\t}\n\n\t/**\n\t * The command used to retrieve the current timestamp from the database.\n\t */\n\tpublic String getCurrentTimestampSelectString() {\n\t\tthrow new UnsupportedOperationException( \"Database not known to define a current timestamp function\" );\n\t}\n\n\t/**\n\t * Does this dialect have an ANSI SQL {@code current_timestamp} function?\n\t */\n\tpublic boolean supportsStandardCurrentTimestampFunction() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Is the result of {@code current_timestamp} stable i.e. does it always produce the same value","sourceCodeStart":3449,"sourceCodeEnd":3485,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java#L3449-L3485","documentation":"Error \"Database not known to define a current timestamp function\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Database not known to define a current timestamp function.","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: Database not known to define a current timestamp function.","solutions":["Override currentTimestamp() in a custom dialect.","Avoid the current_timestamp HQL function for this database."],"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"}