为什么Hibernate STRING无法解析? [英] Why Hibernate STRING can not be resolved?
问题描述
我刚刚下载了Hibernate 4.0.1最终版本的新版本。奇怪的是,当我输入以下代码时:
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
eclipse IDE在STRING关键字上显示错误。我确信我的构建路径中有hibernate jar,并且包含以下代码:
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?
推荐答案
因为该字段在4.0中不存在。
3.5中的字段说明表示:
The field documentation in 3.5 says this:
已弃用。 请参阅 http:// opensource .atlassian.com / projects / hibernate / browse / HHH-5138
现在可以使用< a href =https://docs.jboss.org/hibernate/core/4.0/javadocs/org/hibernate/type/StandardBasicTypes.html#STRING =noreferrer> StandardBasicTypes.STRING
(这几乎是 StringType.INSTANCE
)。
You can now use StandardBasicTypes.STRING
(which is pretty much StringType.INSTANCE
).
这篇关于为什么Hibernate STRING无法解析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!