After upgrading Hibernate-spatial to Version 5.0.0.CR2 the following declaration doesn\'t work anymore:
@Column(columnDefinition = \"geometry(Point,4326)\")
@Typ
So I've been battling this problem for a few days, the thing is that I wanted the database type to be from the postgis type in order for me to run efficient distance queries for nearest neighbour etc. I finally figured out how to do it and wanted to share it with the community so I created a demo project containing the solution to the problem.
My setup is a PostgreSQL database with Postgis, Spring boot jpa, Hibernate 5+, Hibernate-spatial 5+ and also added converting to rest output, which again required a special module from jackson.
the project is found at https://github.com/Wisienkas/springJpaGeo
the important code you was asking for was this:
@type(type = "jts_geometry")
private Point point;