2014-09-18 16:53:43,667 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaExport - HHH000389: Unsuccessful: create table hospital (id bigint generated by default as identity, location GEOMETRY, name varchar(255), version integer, primary key (id))
2014-09-18 16:53:43,667 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaExport - Tipo de dato desconocido : "GEOMETRY"
Unknown data type: "GEOMETRY"; SQL statement:
create table hospital (id bigint generated by default as identity, location GEOMETRY, name varchar(255), version integer, primary key (id)) [50004-172]
@Type(type = "org.hibernate.spatial.GeometryType")
private Point location;
--
You received this message because you are subscribed to the Google Groups "geodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geodb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<property name="connectionInitSqls">
<list>
<value>CREATE ALIAS InitGeoDB for "geodb.GeoDB.InitGeoDB"</value>
<value>CALL InitGeoDB()</value>
</list>
</property>
Function alias "INITGEODB" already exists; SQL statement:
CREATE ALIAS InitGeoDB for "geodb.GeoDB.InitGeoDB"; [90076-172]
He creado las tablas de forma manual y he puesto a "update" el parámetro en el persistence.xml
Ejecutando el comando SHOW TABLES aparece lo siguiente:
@h2> SHOW TABLES; ------------------+--------------+ TABLE_NAME | TABLE_SCHEMA | ------------------+--------------+ GEOMETRY_COLUMNS | PUBLIC | HOSPITAL | PUBLIC | _GEODB | PUBLIC | ------------------+--------------+
Las columnas dentro de HOSPITAL son las siguientes:
@h2> SHOW COLUMNS FROM HOSPITAL; ----------+------------------+------+-----+---------+ FIELD | TYPE | NULL | KEY | DEFAULT | ----------+------------------+------+-----+---------+ LOCATION | BLOB(2147483647) | YES | | NULL | NAME | VARCHAR(255) | YES | | NULL | ID | BIGINT(19) | YES | | NULL |
Como dicen las especificaciones, los campos geometry se guardan como un BLOB.
Sin embargo al añadir un registro en Hospital, aparece el siguiente error:
2014-09-19 10:58:11,171 [http-8080-6] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Tabla "HOSPITAL" no encontrada Table "HOSPITAL" not found; SQL statement:
Un saludo