Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Hibernate STRING can not be resolved?

Tags:

java

hibernate

I just downloaded new release of Hibernate 4.0.1 final release. It is very strange that when I type the following code:

Hibernate.STRING

The eclipse IDE showing an error on the STRING keyword. I am sure that I have the hibernate jar in my build path, and the following code has been included as well:

import org.hibernate.Hibernate;

I just wonder why this could happen?

like image 815
huahsin68 Avatar asked Jun 20 '12 12:06

huahsin68


1 Answers

Because that field doesn't exist in 4.0.

The field documentation in 3.5 says this:

Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138

You can now use StandardBasicTypes.STRING (which is pretty much StringType.INSTANCE).

like image 127
Joachim Sauer Avatar answered Sep 19 '22 17:09

Joachim Sauer