<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hello<br><br><span>i tried working with EJB3 and PostGIS and it was surprisingly easy. Thanks to the thread i found at Nabble. <a target="_blank" href="http://www.nabble.com/PostGIS---hibernate---EJB3-t2064211.html">http://www.nabble.com/PostGIS---hibernate---EJB3-t2064211.html</a></span><br><br>and the work done in this is formally present here:<br><span><a target="_blank" href="http://postgis.refractions.net/support/wiki/index.php?SpatialEJB3">http://postgis.refractions.net/support/wiki/index.php?SpatialEJB3</a>.</span><br><br>hope it solves your problem.<br><br>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:<br>User u = new User();<br>u.setRegion(new JGeometry());<br>em.persist(u);<br><br>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.<br><br>regards<br>rabbia<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Gustavo Ces <g.ces@pettra.es><br>To: PostGIS Users Discussion <postgis-users@postgis.refractions.net><br>Sent: Friday, May 11, 2007 11:02:06 AM<br>Subject: Re: [postgis-users] Experiment: Glassfish/EJB3 and PostGIS<br><br><div>Hi
Bastian,<br><br> in geometry column ( region) youīre trying to insert a null value and <br>program interprets that as a string one. In that type of columns you only <br>can insert geometry types. Why it inserts null values as default is not a <br>postgres sql problem, perhaps a interface one ( iīm not sure). Maybe if geom <br>coumn is a not null one it doesnīt try to insert a null value, but i donīt <br>know. But itīs a curious question. How do you insert a null into geometry <br>type column?<br><br>Gus<br><br><br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@postgis.refractions.net<br><a target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></div><br></div></div><br>
<hr size=1>Now that's room service! <a href="http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
">Choose from over 150,000 hotels <br>in 45,000 destinations on Yahoo! Travel</a> to find your fit.</body></html>