[postgis-users] Using Postgis with hibernate
David Robison
drrobison at openroadsconsulting.com
Sun Mar 18 20:46:38 PDT 2007
I am running a standalone console application which uses Hibernate3 and connects to a postgis database. I have been successful in reading the geomoetry from the database when I define my geometry column in Hibernate as
<property
name="theGeom"
type="java.lang.String"
formula="AsText(force_2d(the_geom))"
length="-1"
/>
This returns the geometry as a WKT string that can easily be read by my application. However, using this definition I am not able to set the value of the geometry. I have read the mailing list about postgis and hibernate and am just more confused. Is there a simple way to define the geometry column to Hibernate to make getting and setting the geometry simple? I would even be pleased with referencing the geometry data as a byte[] or a String from within Java.
Any help and/or clarification would be appreciated.
David Robison
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070318/796ff775/attachment.html>
More information about the postgis-users
mailing list