Hi Mike There is a pending feature request to add support for GIS libraries in MySQL and Postgres: https://github.com/jOOQ/jOOQ/issues/982
I have not yet spent any time investigating a possible implementation. One way for you to circumvent this is to use custom converter types. Here's the manual's section about how to write your custom converter and use it with the jOOQ API: http://www.jooq.org/doc/2.5/manual/sql-execution/fetching/data-type-conversion/ And here's the section where you can wire your converter to generated classes: http://www.jooq.org/doc/2.5/manual/code-generation/custom-data-types/ In case you find a solution along these lines, I'd be interested to see how it works. If you're willing to contribute, this could make it into the jOOQ core Cheers Lukas 2012/10/24 <[email protected]>: > Hello, > > I would like to use the generated Record-classes for easy reading and > writing the entities from and to the database. > But I got a postgis.Point column in a table. > I tried to create an own GeometryTableField from CustomTableField but that > failed at the point where the > constructor of the Field needs a DataType. Making an own DataType failed > because the > DataType's constructor needs a SQLDataType<Point>. But I can't extend > SQLDataType. > > Here's the code: > > public class GeometryDataField extends CustomField<Point>{ > > private static final long serialVersionUID = 1L; > > protected GeometryDataField(String name, DataType<Point> type) { > super(name, type); > } > @Override > public void toSQL(RenderContext context) { > } > @Override > public void bind(BindContext context) throws DataAccessException { > } > } > > and > > public class GeometryDataType extends AbstractDataType< Point> { > private static final long serialVersionUID = 1L; > > protected GeometryDataType(SQLDialect dialect, SQLDataType<Point> > sqldatatype, > Class<? extends Point> type, String typeName) { > super(dialect, sqldatatype, type, typeName); > } > } > > There is no "SQLDataType<Point>" and the constructor of SQLDataType is > private, furthermore the class is final. > > Where can I find a description how to make TableFields for Postgis types or > otherwise use the postgis.Point with Jooq ? > > Greetings > > Mike
