将 hbm.xml 文件更新为 hibernate.spatial.GeometryType 休眠 5

Update hbm.xml file to hibernate 5 for hibernate.spatial.GeometryType

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

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

我们正在更新到 hibernate 5,不再有 GeometryType 对象。 class 我应该改用什么?

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

中有键 jts_geometry