(no subject)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

(no subject)


I am using postgis 2.0svn, postgresql 9.2, hibernate 4, jboss as 7.1

here is my entity

    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
    private Integer id;

    @Type(type = "org.hibernate.spatial.GeometryType")
    public com.vividsolutions.jts.geom.Point getLoc() {return
(com.vividsolutions.jts.geom.Point )loc;    }
    public void setLoc(com.vividsolutions.jts.geom.Point loc) {
        this.loc = loc;
    private  com.vividsolutions.jts.geom.Point loc;

it creates geometry column in postgis

And I tried to persist it.


As a result I got:

20:29:34,838 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(http-- Can't infer the SQL type to use for an
instance of org.postgis.PGgeometry. Use setObject() with an explicit
Types value to specify the type to use.
20:29:34,840 INFO
(http-- HHH000010: On release of batch it still
contained JDBC statements

What do I do wrong ?



Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Planlama ve Zarar Azaltma Dairesi Başkanlığı


Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
hibernatespatial-users mailing list
[hidden email]