Since the parameter can be passed as argument in a function, I guess this is not really possible. Anyway, my use case was binding an array type that I mapped. My current workaround is to bind the collection as string and cast it to the array. The hibernate query API offers a setParameter method that also takes the org.hibernate.type.Type but I can't really use that one. I would expect a parameter only to be expanded, when used with an IN predicate, but that wouldn't help in my case either unfortunately. It would be nice if there was a wrapper type into which I could wrap my actual value into to get the semantics of a TypedValue. |