On further investigation, it seems to me that the count function rendering is hardcoded on the ANTLR SqlGeneratorBase and the registered function is never used. Am I wrong? See https://github.com/hibernate/hibernate-orm/blob/885f76a92ff9d783cbdd3482cf74dfa5e14f01b3/hibernate-core/src/main/antlr/sql-gen.g#L255 Is anyhow possible to customize that? |