[postgis-users] Experiment: Glassfish/EJB3 and PostGIS
rabbiaqaswar at yahoo.com
Fri May 11 05:13:06 PDT 2007
i tried working with EJB3 and PostGIS and it was surprisingly easy. Thanks to the thread i found at Nabble. http://www.nabble.com/PostGIS---hibernate---EJB3-t2064211.html
and the work done in this is formally present here:
hope it solves your problem.
apart from that currently i am working with oracle spatial and ejb3 and i had the same problem as you are having with null values. Like PGGeometry in postgis there is a JGeometry class in oracle spatial library with a default no arg constructor. So whenever i had nothing to store in the geometry column i did:
User u = new User();
This way an empty geometry is stored in the column, containing no geographical information. This way when you are not exactly storing 'null' in your column and when you retrieve the column value you can check the values of the Polygon and most probably they will all contain 0. So you know that no geographical information was stored in that column value.
----- Original Message ----
From: Gustavo Ces <g.ces at pettra.es>
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Sent: Friday, May 11, 2007 11:02:06 AM
Subject: Re: [postgis-users] Experiment: Glassfish/EJB3 and PostGIS
in geometry column ( region) you´re trying to insert a null value and
program interprets that as a string one. In that type of columns you only
can insert geometry types. Why it inserts null values as default is not a
postgres sql problem, perhaps a interface one ( i´m not sure). Maybe if geom
coumn is a not null one it doesn´t try to insert a null value, but i don´t
know. But it´s a curious question. How do you insert a null into geometry
postgis-users mailing list
postgis-users at postgis.refractions.net
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users