Hibernate: how to represent an Oracle UserType as a Query parameter
In Oracle, it is possible to create a user defined type in a package, and then use this within a stored procedure. The UserType may contain several elements, such e.g. two strings and a number. Often, a parameter to a stored procedure will be a UserType, within the procedure itself each element in the parameter may be referenced.
Question: When using a Hibernate Query object within Spring to call a NamedQuery which maps to an Oracle stored procedure, how is it possible to create a java representation of the Oracle UserType to pass in as a query parameter to the procedure?
I should add that I am using Hibernate annotations, not xml, so there is no hibernate-mapping.xml or the like.
Thanks very much