These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Override default type mapping
PostPosted: Sat Apr 30, 2005 11:08 am 
Regular
Regular

Joined: Thu Oct 07, 2004 4:45 pm
Posts: 92
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 30, 2005 11:52 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Please add a feature request to JIRA. I think this is a useful enhancement and it has been requested a few times. A patch from you would be perfect. (It shouldn't be too difficult to merge it into the type parameterization declaration.)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 30, 2005 1:15 pm 
Regular
Regular

Joined: Thu Oct 07, 2004 4:45 pm
Posts: 92
Will do.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.