9

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?

huahsin68
  • 6,819
  • 20
  • 79
  • 113

1 Answers1

19

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).

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614