I am using jooq with a custom binding that converts all JTS geometry types to appropriate Postgis data types. This allows me to write and read JTS geometry types seamlessly, yet I fail to execute queries using those same custom types.
For example when I am trying to add this condition to a query:
Polygon polygon = geometryFactory.createPolygon(
new Coordinate[]{topLeftCorner, bottomLeftCorner, bottomRightCorner, topRightCorner, topLeftCorner}
);
polygon.setSRID(4326);
DSL.condition("ST_WITHIN({0}, {1})", USER.COORDINATES, polygon)
it fails with the following message
org.jooq.exception.SQLDialectNotSupportedException: Type class org.locationtech.jts.geom.Polygon is not supported in dialect DEFAULT