Hello,
I encoutered some unpredictable behaviour with DefaultDataType registry.
Depending on whether the table class containing a geometry column is loaded
(or not) by the class loader, the geometry data type is registered (or
not). In the end, I get the following exception:
org.jooq.exception.SQLDialectNotSupportedException: Type class
com.vividsolutions.jts.geom.Geometry is not supported in dialect SQL99
at org.jooq.impl.DefaultDataType.getDataType(DefaultDataType.java:703)
at org.jooq.impl.DefaultDataType.getDataType(DefaultDataType.java:650)
at org.jooq.impl.DSL.getDataType(DSL.java:13982)
at org.jooq.impl.DSL.val(DSL.java:12104)
at
net.gquintana.jooq.mysql.MySQLSpatialDSL.AsWKT(MySQLSpatialDSL.java:48)
By the way, I've found a oneline workaround:
DefaultDataType.getDefaultDataType(SQLDialect.MYSQL,
"geometry").asConvertedDataType(new GeometryConverter());
Doing this in application bootstrap, forces jOOQ to register the
ConvertedDataType. This basically what jOOQ does when creating the Geometry
column in the table class.
Gérald
Le mercredi 3 septembre 2014 22:27:10 UTC+2, Gérald Quintana a écrit :
>
> Hello,
>
> Just in case someone is interested: I have a very basic yet working
> prototype of integration between jOOQ, MySQL Spatial and JTS (Java Topology
> Suite):
> https://github.com/gquintana/jooq-mysql-spatial
>
> Gérald
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.