Hi, I have been working with Hibernate for little while but I don't know a whole lot about how it works internally. My application has a bunch of named query definitions in the mapping XMLs that I would like to change. I would like to substitute my own implementation of the COALESCE function into these named queries without actually having to change them.
So far what I have done is create my own subclass of StandardSQLFunction. The render function generates my own implementation of the COALESCE function. In my custom dialect, I registered my subclass with the COALESCE function. I was hoping that this would get Hibernate to translate the named queries at runtime to use my new implementation. However, it appears that I have failed at my attempt.
If what I want to do is even possible ( I assume it is but I don't know for sure ), can someone help me figure out the missing pieces to the puzzle? Thanks .
|