[
https://issues.redhat.com/browse/TEIIDSB-227?page=com.atlassian.jira.plug...
]
Fabian Knoll commented on TEIIDSB-227:
--------------------------------------
[~shawkins]: So if it is a basically a blob I think the ST_GeomFromWKB() should work, as
[~rareddy] shows in the example. Unfortunately the following do not work.
{code:java}
package com.example.teidvdbless.teidvdblessapp;
import org.locationtech.jts.geom.MultiLineString;
import org.teiid.spring.annotations.SelectQuery;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
@SelectQuery("SELECT gid, ST_GeomFromWKB(geom), name FROM nyc.nyc_streets")
public class Street {
@Id
int gid;
@Column
MultiLineString geom;
@Column
String name;
{code}
Error:
{code:java}
Caused by: org.teiid.deployers.VirtualDatabaseException: TEIID40095 TEIID31080
teiid.street validation error: TEIID30070 The function 'ST_GeomFromWKB(geom)' is a
valid function form, but the arguments do not match a known type signature and cannot be
converted using implicit type conversions.
at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:854)
~[teiid-runtime-16.0.0-20201002.172031-63.jar:16.0.0-SNAPSHOT]
at org.teiid.spring.autoconfigure.TeiidServer.deployVDB(TeiidServer.java:367)
~[teiid-spring-boot-starter-1.7.0-20200929.142219-2.jar:1.7.0-SNAPSHOT]
... 17 common frames omitted
{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)