Hi
I had created a Dialect so that i can add one method bitwiseAnd() . Was working Good in 3.5.
When I switched to 3.6 It was Depericated Type Hibernate.BIG_INTEGER was used in the function creation
So I changed It to StandardBasicTypes.BIG_INTEGER.
But now I am getting Exception that <databaseName>.bitwiseAnd() function not found!
----
If Switch back to 3.5 and with Depricated Hibernate.BIG_INTEGER it works fine.
-----------------------------------
But I am unable to Undersatnd Why It is not Working In 3.6
---------------------------------------------------------------
Here is My Two classes creating the Dialect With Function bitWiseAnd()
Code:
import org.hibernate.type.StandardBasicTypes;
public class BitWiseAndDialect extends org.hibernate.dialect.MySQLDialect{
public BitWiseAndDialect() {
super();
registerFunction("bitwiseAnd", new BitwiseAndFunction("bitwiseAnd",StandardBasicTypes.BIG_INTEGER));
}
}
//AND
import org.hibernate.QueryException;
import org.hibernate.dialect.function.SQLFunction;
import org.hibernate.dialect.function.StandardSQLFunction;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.type.Type;
public class BitwiseAndFunction extends StandardSQLFunction implements SQLFunction {
public BitwiseAndFunction(String name)
{
super(name);
}
public BitwiseAndFunction(String name, Type type) {
super(name, type);
}
public String render(List args,SessionFactoryImplementor factory)throws QueryException
{
// The code to render the function
}
}
And As i have mentioned it was working (IF I USE Hibernate_BIG_INTEGER with 3.5) so Configuration has no problem.
But is not working with 3.6.