Hi,
Are you sure you have Hibernate Spatial Postgis provider (hibernate-
spatia-postgis-1.0-M2.jar) in your classpath? See: http://
www.hibernatespatial.org/hibernate-spatial-postgis/usage.html
Regards,
Karel
On 20 May 2009, at 11:59, <
[hidden email]>
<
[hidden email]> wrote:
> Hi,
>
> I want to map a linestring from postgis.
>
> The linestring is part of following Route.java class:
>
> **************
> import com.vividsolutions.jts.geom.LineString;
> import java.io.Serializable;
> public class Route implements Serializable {
>
> private long fromID;
> private long toID;
> private LineString coordinates;
> }
> **************
>
> I use following mapping file:
>
> **************
> <hibernate-mapping auto-import="true" default-lazy="false">
> <class name="be.kahosl.tripplanner.common.Route" table="tbl_route">
> <composite-id>
> <key-property name="fromID" />
> <key-property name="toID"/>
> </composite-id>
> <property name="coordinates"
> type="org.hibernatespatial.GeometryUserType" column="coordinates"/>
> </class>
> </hibernate-mapping>
> **************
>
> When I try to save a route object, following insert statement is
> generated by SpatialHibernate:
>
> insert into tbl_route (coordinates, fromID, toID) values
> (SRID=4326;LINESTRING(51.2048191 3.223716,51.2048191 3.223716),
> 201436, 169)
>
> This statement has wrong syntax. Could someone tell me what I am
> doing wrong?
>
> Thanks in advance for your time and answer,
>
> Wouter Souffriau
>
> _______________________________________________
> hibernatespatial-users mailing list
>
[hidden email]
>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
> hibernatespatial-users
_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users