【问题标题】:hibernate spatial mysql 5.7休眠空间mysql 5.7
【发布时间】:2017-05-19 10:52:09
【问题描述】:

我正在尝试使用休眠空间。我做了以下配置....

hibernate.version 5.2.2.Final

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

我错过了什么??

【问题讨论】:

    标签: java hibernate mysql-5.7 hibernate-spatial


    【解决方案1】:

    想通了!!

    删除了 columnDefinition.. 然后一切正常..

    【讨论】:

    • 没有帮助我
    猜你喜欢
    • 1970-01-01
    • 2015-02-23
    • 2014-05-24
    • 1970-01-01
    • 2021-03-25
    • 2011-07-22
    • 2013-04-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多