Does Hibernate 2.1.6 allow for the dynamic configuration of a UserType? I can write an Interceptor for configuring Entities by providing the Interceptor.instantiate method, but I need to do the same thing for a UserType and Interceptor.instantiate isn't called for UserTypes.
I specifically need to open a session within UserType.nullSafeGet and UserType.nullSafeSet but I don't know how to access the SessionFactory. How do I do this?
I am using Spring for my application's configuation, but I don't know how to get at the applicationContext within my UserType - all I can do is get access to the JDBC connection (through the ResultSet and PreparedStatement).
How do I configure a UserType? Any ideas?
Warmest regards, Matt
|