SQLFunction « Database « JPA Q&A





1. Custom SQLFunction that uses an argument more than once    forum.hibernate.org

I have been trying to add a custom SQLFunction to handle a date diff. This is just like the issue here https://hibernate.onjira.com/browse/HHH-2434 . And as it suggests I have created a custom dialect to calculate these. Our product has to support Oracle, DB2 and MSSQL. MSSQL and Oracle work great in all the test cases I have so far. DB2 works ...

2. Custom SQLFunction not being called under Hibernate 3.0.2    forum.hibernate.org

I have a problem with a custom SQLFunction and MySQLDialect which has only started happening since switching from Hibernate 3.0 to Hibernate 3.0.2 and 3.0.3. I have written a MySQLBitwiseAndSQLFunction class derived from StandardSQLFunction which implements the bitwise AND functionality for the MySQLDialect which used to work in Hibernate 2 but was dropped from Hibernate 3. Hibernate version: 3.0.2 and 3.0.3 ...

3. how to execute SQLFunction ?    forum.hibernate.org

I want to persist an object in database. So using save in session would work. But the problem is that I want to set one of the attribute of the object based on the result of execution of an SQL function. Remember that Hibernate wraps sql functions of a DB as class org.hibernate.dialect.function.SQLFunction and sets it into the java.util.Map in Dialect ...