[
https://issues.redhat.com/browse/TEIIDSB-227?page=com.atlassian.jira.plug...
]
Ramesh Reddy commented on TEIIDSB-227:
--------------------------------------
yes, Postgres translator is reading as Geometry type, so no conversion is needed. But
since Teiid may need a SpatialDialect, IMO the workaround could be as Steve suggesting use
` st_ conversion` to read in as text then convert to `MultilineText`. For example:
{code:java}
@Entity
@SelectQuery("SELECT gid, ST_AsText(geom), name FROM nyc.nyc_streets")
public class Street {
@Id
int gid;
@Column
String geom;
@Column
String name;
public MultilineString getMultilineString(){
// this could be more complex than what I am showing here, but I am not sure of
the details.
return new MultilineString(...);
}{code}
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)