cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tore Halset <>
Subject Re: MySQL Spatial Data types
Date Mon, 11 Aug 2008 05:02:57 GMT

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 ( 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.

I am using this in production, but not with MySQL.

  - Tore.

View raw message