Hibernate Dialects + datediff function
问题 I have a problem in that the syntax for datediff in mysql is different from that in hsqldb: mysql: datediff(date1,date2) hsqldb: datediff(interval,date1,date2) The dialects in hibernate usually resolve these issues, however I don't seem to be able to find a way of creating a datediff restriction for hibernate. This is a real nuisance because it prevents me from unit testing with an in-memory hsql database since I have to 'hardcode' the format of datediff in a sql statement. If anyone has