[
https://issues.redhat.com/browse/TEIIDSB-227?page=com.atlassian.jira.plug...
]
Steven Hawkins commented on TEIIDSB-227:
----------------------------------------
I needed to review more of this. My assumption about what was going on here was not
correct.
The database is a PostGis and the type is a geometry, not a blob.
It should then be imported as a teiid geometry type. Calling st_geomfromwkb on something
that is already a geometry value is expected fail as there is no implicit conversion from
geometry to blob.
One workaround, based on using a clob is:
That confirms that the value is being imported as a teiid geometry and that you can apply
the st_ conversion function to text.
With version 1.7.0-SNAPSHOT and for this class (code-snippet) I still
get an error:
Our GeometryType values are serializable, but based upon
https://stackoverflow.com/questions/48946230/java-io-streamcorruptedexcep...
that seems similar to issues hibernate has had with serdes and geometry types in the past.
It shouldn't be a classloading issue as teiid spring boot and hibernate spatial are
both depending upon org.locationtech.jts:jts-core 1.16
However Teiid is only providing a regular dialect, not a SpatialDialect. Some of the
other comments on stackoverflow post and related indicate that the postgis dialect is
required, so we may similarly need to provide a SpatialDialect.
Information about support for Hibernate-Spatial
-----------------------------------------------
Key: TEIIDSB-227
URL:
https://issues.redhat.com/browse/TEIIDSB-227
Project: Teiid Spring Boot
Issue Type: Task
Components: datasource
Affects Versions: 1.6.0
Reporter: Fabian Knoll
Priority: Major
Labels: hibernate, spatial, types
Fix For: 1.7.0
Hi,
in our project we tried to use Teiid-Spring-Boot to connect to a PostGIS database. We
want to use the so called [VDB-less
Development|https://github.com/teiid/teiid-spring-boot/blob/master/docs/U...].
Therefore the hibernate spatial mapping for geometry-Types is needed. We tried different
(datasource) configurations, but we couldn't get a running example.
Is the hibernate-spatial type mapping supported in Teiid-Spring-Boot and if so, can you
provide us an example?
Hint: In our entities we use org.locationtech.jts.geom.Geometry (and subtypes) for the
mapped fields.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)