Are you using Spring? If not, I would recommend it. If you use
Spring managed hibernate, you can get easy access to both the
HibernateTemplate, JpaTemplate, and the JdbcTemplate.
Using the JdbcTemplate, you can quickly execute any SQL you want. You
can also execute any native SQL using the Hibernate API, but the API
is kind of a mis-match for what you want to do, b/c it expects you are
executing a query.
I have a blog example of using Spring + Hibernate + JPA here:
http://zenoconsulting.wikidot.com/blog:8 -- hope that helps.
Regards,
Davis
On Wed, Apr 29, 2009 at 4:28 PM, Farrukh Najmi
<
[hidden email]> wrote:
> Farrukh Najmi wrote:
>> Karel Maesen wrote:
>>
>>> Hi Farrukh,
>>>
>>>
>>> On 29 Apr 2009, at 14:11, Farrukh Najmi wrote:
>>>
>>>
>>>> However, I notice that the geometry_columns table in the database is
>>>> empty. I was expecting it to have a row for the geometry column in
>>>> table
>>>> BAR.
>>>>
>>>>
>>> There is a longstanding RFE for this:
http://www.hibernatespatial.org/>>> jira/browse/HIBSPA-4
>>>
>>>
>>>
>>>
>>>> I wonder if that means that my spatial queries are not indexed and as
>>>> data grows the performance will not scale.
>>>>
>>>>
>>>
>>>
>>>> Do I need to define an index manually?
>>>>
>>>>
>>> Postgis actually doesn't use this information. It is added for full
>>> OGC support. The geometry_columns table has no bearing on whether or
>>> not your data is indexed. So yes, you must define indexes manually.
>>>
>>>
>>>
>> Hi Karel,
>>
>> Thanks for the info. One last followup question...
>>
>> Is there any programmatic API to create the spatial index?
>>
>> Thanks again.
>>
>>
> Alternatively, is there a programmatic way in hibernate to execute
> arbitrary DDL?
>
> --
> Regards,
> Farrukh
>
> Web:
http://www.wellfleetsoftware.com>
>
> _______________________________________________
> hibernatespatial-users mailing list
>
[hidden email]
>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users>
--
Zeno Consulting, Inc.
home:
http://www.zenoconsulting.bizblog:
http://zenoconsulting.wikidot.comp: 248.894.4922
f: 313.884.2977
_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users