How to fectch oracle spatial SDO_GEOMETRY as com.vividsolutions.jts.geom.Geometry
using hibernate session?
I have one Geometry parameter as below
I want to fetch the geom field from the database(only geom field not the entire object) I need to get this geom as com.vividsolutions.jts.geom.Geometry
I am getting the below error while fetching using HQL
javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002
I have configured the dialect correctly org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect
import com.vividsolutions.jts.geom.Geometry;
@Entity
@Table(name="STG_C_COUNTRY")
public class StgCCountry implements Serializable {
private Geometry geom;
public void setGeom(Geometry geom) {
this.geom = geom;
}
public Geometry getGeom() {
return this.geom;
}
}
Could you try with and let me know :
...
@Column(columnDefinition = "SDO_GEOMETRY")
private Geometry geom;
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.