【发布时间】:2019-02-27 21:03:47
【问题描述】:
我想使用 MySQL 10 和 Point for Geolocations。 我的方言属性是:
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
在我目前使用的实体上:
@Column(name="location", columnDefinition = "POINT")
private org.springframework.data.geo.Point location;
错误信息是:
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Cannot get geometry object from data you send to the GEOMETRY field
我尝试使用 JpaRepository => save()
保存它JPA 可以吗?
【问题讨论】:
标签: mysql jpa geolocation spring-data-jpa