休眠空间 MySQL 5.7



我试图使用休眠空间。我已经完成了以下配置....

休眠版本5.2.2.最终版

MySQL 5.7

<dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-spatial</artifactId>
        <version>5.2.10.Final</version>
    </dependency>
    <dependency>
        <groupId>com.vividsolutions</groupId>
        <artifactId>jts</artifactId>
        <version>1.13</version>
    </dependency>
hibernate.dialect

=[org.hibernate.spatial.dialect.mysql.MySQLSpatialDialect]

@Column(name = "GeoLocation", columnDefinition = "Point") public Point getGeoLocation() {
    return geoLocation;
}

但它给了我错误:-

org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [GeoLocation] in table [osamdb.customerlocations]; found [geometry (Types#BINARY)], but expecting [point (Types#ARRAY)]

我错过了什么??

想通了!!

删除了列定义..然后一切都很好..

最新更新