-->
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.  [ 6 posts ] 
Author Message
 Post subject: Replacement for depreacted Type methods
PostPosted: Mon May 17, 2010 1:04 am 
Newbie

Joined: Mon May 17, 2010 12:53 am
Posts: 2
It appears that as a result of HHH-5196 in 3.5.2 type fields such as org.hibernate.Hibernate.STRING are now deprecated. The docs point to HHH-5138 but it is not clear what the new method is to obtain these types. The JIRA issue describes a plan for new type classes but I don't see them in the Javadoc. So what is the replacement for:

Hibernate.STRING.sqlType()

Thanks,
Baron


Top
 Profile  
 
 Post subject: Re: Replacement for depreacted Type methods
PostPosted: Mon May 17, 2010 2:07 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
I don't think there is a replacement until 3.6. I checked the code in the trunk and it currently reads:

Code:
/**
* Hibernate <tt>string</tt> type.
* @deprecated Use {@link StringType#INSTANCE} instead.
*/
public static final StringType STRING = StringType.INSTANCE;


This was added as part of http://opensource.atlassian.com/project ... e/HHH-5138 which is listed to appear in 3.6.


Top
 Profile  
 
 Post subject: Re: Replacement for depreacted Type methods
PostPosted: Mon May 17, 2010 2:17 am 
Newbie

Joined: Mon May 17, 2010 12:53 am
Posts: 2
Thanks for the hint. So it seems that until 3.6 ships, I can make a static version in my class:

Code:
private static final StringType STRING = new StringType();


Avoids the deprecation and provides the required functionality. Sound reasonable?


Top
 Profile  
 
 Post subject: Re: Replacement for depreacted Type methods
PostPosted: Mon May 17, 2010 2:35 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
I guess that should be ok. Just got 68 warnings about this in my own project, so I'll probably do something similar. Too bad the Hibernate team didn't include the INSTANCE fields in 3.5.2 as well.


Top
 Profile  
 
 Post subject: Re: Replacement for depreacted Type methods
PostPosted: Mon May 31, 2010 1:46 pm 
Beginner
Beginner

Joined: Thu May 05, 2005 4:49 pm
Posts: 30
Seriously guys? You deprecated something with no alternative that removes the deprecation?


Top
 Profile  
 
 Post subject: Re: Replacement for depreacted Type methods
PostPosted: Thu Feb 24, 2011 6:35 am 
Newbie

Joined: Thu Jun 16, 2005 7:00 am
Posts: 6
Is this issue related? http://opensource.atlassian.com/project ... e/HHH-5877


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.