As a business requirement, I have to do all data modifications through stored procedures. I'd like to get Hibernate to use my procedures seamlessly, but the only thing keeping me from doing this is my inability to specify user types for parameters on my native queries. I can specify type defs using annotations, and then annotate my fields with @Type. Then, hibernate will use my user type properly. However, when I call my named native query in the DAO, I need to explicitly set all of the parameter user types.

I have two problems.1. Can I specify the parameter types in annotations related to my @NamedNativeQuery? If so, then I can use @SQLInsert and @SQLUpdate hints to get the persister to use my procedures for saves.2. If I can't do #1... how can I reference my type defs by name? If you noticed in the DAO I'm forced to recreate them programatically because I can't seem to figure it out.