{"record":{"id":"b5ea71adb9b16576","repo":"hibernate/hibernate-orm","slug":"classname-does-not-support-timestampdiff","errorCode":null,"errorMessage":"'{className}' does not support 'timestampdiff()'","messagePattern":"'(.+?)' does not support 'timestampdiff\\(\\)'","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java","lineNumber":1799,"sourceCode":"\t */\n\tpublic boolean supportsFractionalTimestampArithmetic() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Obtain a pattern for the SQL equivalent to a\n\t * {@code timestampdiff()} function call. The resulting\n\t * pattern must contain ?1, ?2, and ?3 placeholders\n\t * for the arguments.\n\t *\n\t * @param unit the first argument\n\t * @param fromTemporalType true if the first argument is\n\t *                      a timestamp, false if a date\n\t * @param toTemporalType true if the second argument is\n\t */\n\t@SuppressWarnings(\"deprecation\")\n\tpublic String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) {\n\t\tthrow new UnsupportedOperationException( \"'\" + getClass().getName() + \"' does not support 'timestampdiff()'\" );\n\t}\n\n\t/**\n\t * Obtain a pattern for the SQL equivalent to a\n\t * {@code timestampadd()} function call. The resulting\n\t * pattern must contain ?1, ?2, and ?3 placeholders\n\t * for the arguments.\n\t *\n\t * @param unit The unit to add to the temporal\n\t * @param temporalType The type of the temporal\n\t * @param intervalType The type of interval to add or null if it's not a native interval\n\t */\n\t@SuppressWarnings(\"deprecation\")\n\tpublic String timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) {\n\t\tthrow new UnsupportedOperationException( \"'\" + getClass().getName() + \"' does not yet support 'timestampadd()'\" );\n\t}\n\n\t/**","sourceCodeStart":1781,"sourceCodeEnd":1817,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java#L1781-L1817","documentation":"Error \"'{className}' does not support 'timestampdiff()'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A dialect-specific function or stream operation is used that the current database dialect does not support.","commonSituations":"Calling timestampadd()/timestampdiff() on dialects lacking support, or LOB stream handling hitting IO failures.","solutions":["Use a dialect that supports timestampdiff(), or rewrite the query with a supported function/native SQL for this database."],"exampleFix":"Use a dialect that supports timestampdiff(), or rewrite the query with a supported function/native SQL for this database.","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"}