Я недавно работал с hibernate-space 5 и столкнулся с проблемой. Когда я пытаюсь добавить свои данные геометрии в Postgres. У меня следующая ошибка на этапе фиксации транзакции:
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute statement] with root cause
org.postgresql.util.PSQLException: ERROR: Invalid endian flag value encountered.
Моя сущность выглядит следующим образом, я настроил ее, как и в предыдущих сообщениях с такой же проблемой:
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "geotable")
@Indexed(index = "geoindex")
public class GeoPointModel implements Serializable {
@Id
@GeneratedValue
@DocumentId
@Column(name = "point_id")
private Long id;
@Field(index = Index.YES, analyze = Analyze.NO, store = Store.YES)
@FieldBridge(impl = GeoBridge.class)
@Column(name = "location", columnDefinition = "geometry(Point,4326)")
private Geometry location;
}
Мои зависимости:
dependencies {
implementation 'org.hibernate:hibernate-core:5.4.5.Final'
implementation 'org.hibernate:hibernate-spatial:5.4.5.Final'
implementation 'org.springframework:spring-orm:5.1.5.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc', version: '2.1.8.RELEASE'
compile group: 'org.hibernate', name: 'hibernate-search-orm', version: '5.11.3.Final'
compile group: 'org.apache.lucene', name: 'lucene-spatial', version: '5.5.5'
compile group: 'com.spatial4j', name: 'spatial4j', version: '0.4.1'
compile group: 'com.vividsolutions', name: 'jts', version: '1.13'
compile group: 'net.postgis', name: 'postgis-jdbc', version: '2.3.0'
}
Диалект:
dialect=org.hibernate.spatial.dialect.postgis.PostgisPG9Dialect
Что я потерял? Как это можно исправить?