cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Blair <rick.bl...@boeing.com>
Subject Re: MySQL Spatial Data types
Date Mon, 11 Aug 2008 05:42:00 GMT
Thanks! 

I will give it a try.
 
-- 
Cheers!

Rick Blair




> From: Tore Halset <halset@pvv.ntnu.no>
> Reply-To: <user@cayenne.apache.org>
> Date: Mon, 11 Aug 2008 07:02:57 +0200
> To: <user@cayenne.apache.org>
> Subject: Re: MySQL Spatial Data types
> 
> 
> On 11. aug.. 2008, at 04.54, Aristedes Maniatis wrote:
> 
>> 
>> On 11/08/2008, at 12:23 PM, Rick Blair wrote:
>> 
>>> I have an existing mysql (5.1)  database that has a column named
>>> location
>>> that is a POINT datatype.  I used the DataModeler and attached to my
>>> database.  I was able to use my existing schema, however the data
>>> type in
>>> the Modeler for that column show as OTHER.  The class that was
>>> generated was
>>> had the following methods:
>> 
>> I haven't used them myself, but you may need to use something like
>> JTS (http://www.vividsolutions.com/JTS) to get these data types
>> across JDBC into Cayenne. And then some customisation of the mysql
>> database adapter [1] might be needed.
> 
> Here is an example how to convert between WKT in a database and JTS
> geomertries on the java side. You may have to modify it to let MySQL
> convert the POINT datatype from/to WKT.
> 
> http://cwiki.apache.org/CAY/mapping-jts-geometries.html
> 
> I am using this in production, but not with MySQL.
> 
> Regards,
>   - Tore.
> 


Mime
View raw message