This made it possible to generate the schema and then use it when
creating the database; I tested both inserting and querying the
spatial column and it seems to be working. So until the issue of
generating the schema with GeoDBDialect in Hibernate Spatial is fixed,
this solution can be used instead when you want to automatically
generate the schema from Hibernate mapping files.
I hope that clears up some things. Big thanks for that extension to
H2/GeoDB, it should help in our testing procedure!
> Hi Justin,
> my Hibernate mapping looks like that (sorry for not using the
> attachment but my working environment prevents uploads of them):
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
> 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <class table="NSIL_COVERAGE" name="package.NSIL_COVERAGE">
> <id access="property" name="id">
> <generator class="native"/>
> <property name="spatialCountryCode"
> index="NSIL_COVERAGE_sp_d14e1605_idx" length="20"
> <property name="spatialGeographicReferenceBox"
> <property name="temporalEnd" column="temporalEnd"/>
> <property name="temporalStart" column="temporalStart"/>
> As for the actual database table, I am using Hibernates ExportSchema
> task which basically takes the mapping like above and generates the
> DDL SQL for me. This procedure fails however, with the same ecxeption
> ('No Dialect mapping for JDBC type: 2003'). Because SchemaExport is
> using Hibernate dialect to do all this, we come to the starting point
> of this whole thread - GeoDBDialect is not providing proper types.
> Looking at the sources for GeoDBDialect here : http://bit.ly/cwNqA7 ,
> it looks that it is extending Hibernate's H2 dialect so we shouldn't
> get the complaints about the array type (2003) missing.
>> Justin Deoliveira <[hidden email]> Aug 24 10:23AM -0600 ^
>> Hi Lukasz,
>> 2003 looks like it is an array type. What is the schema of the table you are
>> trying to map? Also how does your GeoDB dialect work? Does it extend the
>> regular H2 one?