org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002
Posted
by Moli
on Stack Overflow
See other posts from Stack Overflow
or by Moli
Published on 2010-06-15T10:14:11Z
Indexed on
2010/06/15
10:22 UTC
Read the original article
Hit count: 1002
Hi at all,
I'm having a issue trying to get working a JPA nativeQuery. I'm having a org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002 when a try to do a nativeQuery and get a geometry field type. I use oracle and org.hibernatespatial.oracle.OracleSpatial10gDialect.
The geom fields is mapped as:
@Column(name="geometry")
@Type(type = "org.hibernatespatial.GeometryUserType")
private Geometry geometry;
List<Object> listFeatures= new LinkedList<Object>();
Query query= entityManager.createNativeQuery(
"SELECT "+ slots +" , geometry FROM edtem_features feature, edtem_dades dada WHERE" +
" feature."+ tematic.getIdGeomField() +" = dada."+ tematic.getIdDataField()+
" AND dada.capesid= "+ tematic.getCapa().getId() +
" AND feature.geometriesid= "+ tematic.getGeometria().getId());
listFeatures.addAll( query.getResultList());
Anybody knows a solution? or how to force the type of the geometry to get wroking this...
MANY Thanks in advance. Moli
© Stack Overflow or respective owner