0
I have a problem to persist a geometric data in the database (Postgres) I gave a read on the forums and documentation and found nothing about it, someone can give me a help?
Libs:
pom.xml with versions
<hibernate.envers.version>4.3.11.Final</hibernate.envers.version>
<hibernate.spatial.version>4.3.1-52N</hibernate.spatial.version>
<hibernate.validator>4.3.2.Final</hibernate.validator>
<hibernate.em.version>4.3.11.Final</hibernate.em.version>
Ownership of the entity
@Column(name="the_geom" , columnDefinition = "Geometry", nullable = true)
@Type(type = "org.hibernate.spatial.GeometryType")
private Geometry theGeom;
Error:
You cannot infer an SQL type to be used for an instance of
org.postgis.PGgeometry
. UsesetObject()
with a Types value explicit to specify the type to be used.
I would like to use the lib of Hibernate Spatial to make the persistence, I even managed to make the persistence after having created a new project with the same dependencies inclusive, but I can’t do in my application because it points out this error. But thanks, it might be a good alternative.
– Diego Raian
Bacana Diego. Recently we took Hibernate out of the application. When you find the solution, post here! :)
– karanalpe
I used what you suggested, but I’m trying to figure out why, as soon as I can!
– Diego Raian