Hibernate Spatial: “No Dialect mapping for JDBC type: 3000”

后端 未结 2 1773
深忆病人
深忆病人 2021-01-14 19:38

I\'m attempting to integrate Spring Roo with a PostGIS-enabled PostgreSQL database via Hibernate, following the Hibernate Spatial tutorial. All of the non-GIS stuff is worki

2条回答
  •  梦毁少年i
    2021-01-14 20:23

    Your exception means that Postgresql dialect can't support the data type you have provided by annotation. Extending it with a custom class to add support could be a way to solve your problem.

    I've look at the GIS project, do you provide javassist dependency with compile scope too ?

    Did you try to reference your data types with the following annotations? See https://stackoverflow.com/a/3047190/390462.

    @Column(name = "geometry", columnDefinition="Geometry", nullable = true) 
    private Geometry geometry;
    

    As much as I have understood, you need to give a columnDefinition to your field, otherwise it would not be able to map the field to the good db column.

提交回复
热议问题