Spring data JPA: cannot persist object with attribute of type Point em Java Postado Setembro 24, 2022 While trying to persist an object with an attribute of type Point, defined as follows: @Entity @Table(name = "event") public class Event { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private long id; @Column(columnDefinition = "POINT") private Point coordinate; } I'm getting the error Data truncation: Cannot get geometry object from data you send to the GEOMETRY field. The corresponding database table is defined as follows: create table event ( id bigint not null auto_increment, coordinate POINT, primary key (id) ) engine= InnoDB; What am I missing?
Spring data JPA: cannot persist object with attribute of type Point
em Java
Postado
While trying to persist an object with an attribute of type
Point
, defined as follows:@Entity @Table(name = "event") public class Event { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private long id; @Column(columnDefinition = "POINT") private Point coordinate; }
I'm getting the error
Data truncation: Cannot get geometry object from data you send to the GEOMETRY field
.The corresponding database table is defined as follows:
create table event ( id bigint not null auto_increment, coordinate POINT, primary key (id) ) engine= InnoDB;
What am I missing?