I am developing an application that will run on both MySql and MS SQL.
I have a field that is "geometry" type for spatial.
By using:
@Column(columnDefinition = "geometry")
private Point geometry;
(point is org.springframework.data.geo.Point)
Hibernate creates the field properly (hbm2ddl).
But inserting any point does not work. I get : Data truncation: Cannot get geometry object from data you send to the GEOMETRY field
I use spring-boot-jpa-starter.. and not direct hibernate.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-spatial</artifactId>
<version>5.2.2.Final</version>
</dependency>
Regards, Ido