0

我有一个 Location.hbm.xml 文件,其中包含以下行:

<property name="coordinates" type="org.hibernate.spatial.GeometryType">
        <column name="coordinates" />
</property>

我们正在更新到休眠 5,并且不再有 GeometryType 对象。我应该改用什么类?

4

1 回答 1

0

在 Hibernate 5 中,Hibernate Spatial 比以前更紧密地集成在 Hibernate-core 中。如果您的坐标属性是 JTS Geometry 类型,并且 hibernate-spatial 5 在类路径上,它应该会自动解析。该类型在类型注册表中有键 jts_geometry

于 2016-03-02T21:11:53.617 回答