|
Is there an "easy" way to override Hibernate's default type mappings? Or replace a built-in type? Specifically, I want all java.util.Date properties to map to a UserType that converts to and from GMT time zone. And I want any queries that use times as parameters to use the UserType.
I could explicitly map the columns to the user type and use Hibernate.custom(Class) for query parameters, but this is very error-prone. If any developer in my organization forgets to do it, it's a bug. I'd rather have it work automatically.
I'm using Hibernate 2.1.8.
Thanks.
|