Hibernate version:
1.2.0.3001
Name and version of the database you are using:
MySQL 5.0.15
I've made a custom Nhibernate Dialect which inherits the MySQLDialect, because I want support for bitwise operators (its similar to what the guy in this topic is doing:
http://forum.hibernate.org/viewtopic.php?t=940978). I register the custom SQLFunction like this:
Code:
Me.RegisterFunction("BitWiseAnd", New MySQLBitwiseAndSQLFunction())
MySQLBitwiseAndSQLFunction is a class which implements ISQLFunction
When reading out the Functions (by using SessionFactory.Dialect.Functions.Values) I can see that my function is added. However, when I execute a query with my custom function in it, Nhibernate won't transform my function.
When executing the following (the BitWiseAnd doesn't do anything special at the moment, it only returns a fixed string in the Render method for testing):
Code:
Select BitWiseAnd(1) From NS.TestObject
No errors occur, but it seems that Nhibernate just trows the the BitWiseAnd(1) away.
In the following topic I've found that this isn't supported until CR1
http://forum.hibernate.org/viewtopic.php?t=970419, However I'm using the CR1 so this shouldn't be the problem.
Quote:
The function will be there in the CR1 release. It's possible that you can't add/override functions,
Can somebody please point me in the right direction?
Thanks in advance!