I have a custom function in Hibernate 5.x which I’m trying to migrate to Hibernate 6.x. One of the arguments is of SqmParameterInterpretation type. I need to convert it to String to do some validation and replace operations. I couldn’t find any documentation/reference regarding this. Is there a way to convert SqlAstNode arguments to String.
That’s not currently possible. Can’t you use the replace()
SQL function on the parameter itself to avoid peeking at the bind value? That will improve statement caching.
But I still needed to extract String value for some validation. I figured it to pass the arguments using literal(), which has a way to extract the String value.
1 Like